From 6c5de402dbee444300c5671e5f126c724a2a9897 Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Sun, 5 Jan 2020 03:05:23 -0800 Subject: [PATCH] If no photo faces, do not error Signed-off-by: James Ketrenos --- frontend/face-explorer.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/face-explorer.html b/frontend/face-explorer.html index 184a348..72edca9 100644 --- a/frontend/face-explorer.html +++ b/frontend/face-explorer.html @@ -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 */