Improved nextPhoto and previousPhoto check

This commit is contained in:
Tobias Reich 2016-08-27 18:06:47 +02:00
parent 3a458939c9
commit cea42f126a

View File

@ -413,8 +413,8 @@ view.photo = {
let $nextArrow = lychee.imageview.find('a#next') let $nextArrow = lychee.imageview.find('a#next')
let $previousArrow = lychee.imageview.find('a#previous') let $previousArrow = lychee.imageview.find('a#previous')
let photoID = photo.getID() let photoID = photo.getID()
let hasNext = album.json && album.json.content && album.json.content[photoID] && album.json.content[photoID].nextPhoto!=='' let hasNext = album.json && album.json.content && album.json.content[photoID] && album.json.content[photoID].nextPhoto!=null && album.json.content[photoID].nextPhoto!==''
let hasPrevious = album.json && album.json.content && album.json.content[photoID] && album.json.content[photoID].previousPhoto!=='' let hasPrevious = album.json && album.json.content && album.json.content[photoID] && album.json.content[photoID].previousPhoto!=null && album.json.content[photoID].previousPhoto!==''
if (hasNext===false || lychee.viewMode===true) { if (hasNext===false || lychee.viewMode===true) {