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';