Check if album.json exists

album.json is null when in the overview. album.getParent() was unusable in this case.
This commit is contained in:
Tobias Reich 2016-07-31 16:17:41 +02:00
parent 066fc90056
commit 61a62421f4

View File

@ -42,9 +42,7 @@ album.getID = function() {
album.getParent = function() {
let id = album.json.id
if (album.isSmartID(id)===true || album.json.parent==0) return ''
if (album.json==null || album.isSmartID(album.json.id)===true || album.json.parent==0) return ''
return album.json.parent