v1.5.74 - add el existence check

This commit is contained in:
Azgaar 2021-02-27 01:06:29 +03:00
parent b256030602
commit ec4b08c9d8

View file

@ -779,9 +779,9 @@ function parseLoadedData(data) {
} }
}() }()
const notHidden = selection => selection.style("display") !== "none"; const notHidden = selection => selection?.style("display") !== "none";
const hasChildren = selection => selection.node()?.hasChildNodes(); const hasChildren = selection => selection?.node()?.hasChildNodes();
const hasChild = (selection, selector) => selection.node()?.querySelector(selector); const hasChild = (selection, selector) => selection?.node()?.querySelector(selector);
const turnOn = el => document.getElementById(el).classList.remove("buttonoff"); const turnOn = el => document.getElementById(el).classList.remove("buttonoff");
void function restoreLayersState() { void function restoreLayersState() {