Fixed bug in countSubAlbums.

This commit is contained in:
Nils Asmussen 2016-07-30 15:11:49 +02:00
parent f7e31c2be7
commit 8b37d122b9

View File

@ -211,6 +211,7 @@ contextMenu.photo = function(photoID, e) {
function countSubAlbums(photoIDs) { function countSubAlbums(photoIDs) {
let count = 0 let count = 0
if (album.subjson) {
for (i in photoIDs) { for (i in photoIDs) {
for (j in album.subjson.albums) { for (j in album.subjson.albums) {
if (album.subjson.albums[j].id == photoIDs[i]) { if (album.subjson.albums[j].id == photoIDs[i]) {
@ -219,6 +220,7 @@ function countSubAlbums(photoIDs) {
} }
} }
} }
}
return count return count
} }