From ec4b08c9d873fd37213651a6634ab654d459734d Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sat, 27 Feb 2021 01:06:29 +0300 Subject: [PATCH] v1.5.74 - add el existence check --- modules/save-and-load.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/save-and-load.js b/modules/save-and-load.js index 811bee7e..cd1ea032 100644 --- a/modules/save-and-load.js +++ b/modules/save-and-load.js @@ -779,9 +779,9 @@ function parseLoadedData(data) { } }() - const notHidden = selection => selection.style("display") !== "none"; - const hasChildren = selection => selection.node()?.hasChildNodes(); - const hasChild = (selection, selector) => selection.node()?.querySelector(selector); + const notHidden = selection => selection?.style("display") !== "none"; + const hasChildren = selection => selection?.node()?.hasChildNodes(); + const hasChild = (selection, selector) => selection?.node()?.querySelector(selector); const turnOn = el => document.getElementById(el).classList.remove("buttonoff"); void function restoreLayersState() {