Browse Source

Check to make sure hot spot div exists before deleting it (#702).

pull/707/head
Matthew Petroff 5 years ago
parent
commit
19b020dbc7
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      src/js/pannellum.js

+ 5
- 3
src/js/pannellum.js View File

@@ -1784,10 +1784,12 @@ function destroyHotSpots() {
if (hs) {
for (var i = 0; i < hs.length; i++) {
var current = hs[i].div;
while(current.parentNode != renderContainer) {
current = current.parentNode;
if (current) {
while(current.parentNode != renderContainer) {
current = current.parentNode;
}
renderContainer.removeChild(current);
}
renderContainer.removeChild(current);
delete hs[i].div;
}
}


Loading…
Cancel
Save