From 82d1bc4b4e87ba5e86955b17fdaffde4be9af683 Mon Sep 17 00:00:00 2001 From: Matthew Petroff Date: Sat, 17 Oct 2015 15:54:57 -0400 Subject: [PATCH] Add error for when panorama image isn't specified. --- src/js/pannellum.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/pannellum.js b/src/js/pannellum.js index 222fdb7..28b447a 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -198,6 +198,7 @@ function init() { div.innerHTML = ""; if (div.getElementsByTagName("i").length == 1) { anError(); + return; } var i, p; @@ -219,6 +220,10 @@ function init() { } panoImage = c; } else { + if (config.panorama === undefined) { + anError('No panorama image was specified.'); + return; + } if (config.video === true) { panoImage = document.createElement('video'); infoDisplay.load.lbox.style.display = 'block';