Do not break on front end if partial records are received

Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
James Ketr 2018-10-16 17:25:05 -07:00
parent ac6fba87d3
commit 81b01f786e

View File

@ -1064,7 +1064,11 @@
} }
photos.forEach(function(photo) { photos.forEach(function(photo) {
var year = (photo.taken || photo.modified || photo.added).replace(/^(....).*$/, "$1"); var year = (photo.taken || photo.modified || photo.added || "").replace(/^(....).*$/, "$1");
if (!year) {
console.log("Partial photo record received: " + photo.id);
return;
}
if (this.years.indexOf(year) == -1) { if (this.years.indexOf(year) == -1) {
this.push("years", year); this.push("years", year);
} }