If no photo faces, do not error
Signed-off-by: James Ketrenos <james_gitlab@ketrenos.com>
This commit is contained in:
parent
bfcd137ea9
commit
6c5de402db
@ -95,6 +95,10 @@ function makeFaceBoxes() {
|
|||||||
const el = document.getElementById("photo"),
|
const el = document.getElementById("photo"),
|
||||||
photo = photos[photoIndex];
|
photo = photos[photoIndex];
|
||||||
|
|
||||||
|
if (!photo.faces || !photo.faces.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let width, height, offsetLeft = 0, offsetTop = 0;
|
let width, height, offsetLeft = 0, offsetTop = 0;
|
||||||
|
|
||||||
/* If photo is wider than viewport, it will be 100% width and < 100% height */
|
/* If photo is wider than viewport, it will be 100% width and < 100% height */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user