Browse Source

Fix an error when deleting a dragged entity

The viewer would try to call updateEntityElement, but the
entity would be deleted, causing an error.
master
Fen Dweller 5 years ago
parent
commit
37142c2db0
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      macrovision.js

+ 3
- 0
macrovision.js View File

@@ -1167,6 +1167,9 @@ function removeEntity(element) {
if (selected == element) {
deselect();
}
if (clicked == element) {
clicked = null;
}

const option = document.querySelector("#options-selected-entity-" + element.dataset.key);
option.parentElement.removeChild(option);


Loading…
Cancel
Save