If no photo faces, do not error

Signed-off-by: James Ketrenos <james_gitlab@ketrenos.com>
This commit is contained in:
James Ketrenos 2020-01-05 03:05:23 -08:00
parent bfcd137ea9
commit 6c5de402db

View File

@ -95,6 +95,10 @@ function makeFaceBoxes() {
const el = document.getElementById("photo"),
photo = photos[photoIndex];
if (!photo.faces || !photo.faces.length) {
return;
}
let width, height, offsetLeft = 0, offsetTop = 0;
/* If photo is wider than viewport, it will be 100% width and < 100% height */