From 6950d401a7a39e3bb4f55c970b256eba946f1174 Mon Sep 17 00:00:00 2001 From: Benjamin BERNARD Date: Fri, 14 Aug 2015 19:20:38 +0200 Subject: [PATCH] Fix 'undefined' bug in fallback URLs (in library version) --- src/js/libpannellum.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/js/libpannellum.js b/src/js/libpannellum.js index 32db362..f4a5fa1 100644 --- a/src/js/libpannellum.js +++ b/src/js/libpannellum.js @@ -95,7 +95,12 @@ function Renderer(container, image, imageType, video) { world.className = 'pnlm-world'; // Add images - var path = image.basePath + image.fallbackPath; + var path; + if (image.basePath) { + path = image.basePath + image.fallbackPath; + } else { + path = image.fallbackPath; + } var sides = ['f', 'r', 'b', 'l', 'u', 'd']; var loaded = 0; var onLoad = function() {