aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2025-07-22 17:27:20 +0200
committerGuilhem Moulin <guilhem@fripost.org>2025-07-22 17:36:25 +0200
commit35c6975a88439716901c3bdbd3f2f497ab56fa42 (patch)
tree273de8da8e9b7170597d0751e19a6557d8cffd89
parente63235e00882b40477637201417eb1c505e69e6a (diff)
Replace more `=== undefined` with `== null`.
Cf. 887c24b79489fc9403a98a039a9138e48fc147a7.
-rw-r--r--main.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.js b/main.js
index af0e874..ff7dec9 100644
--- a/main.js
+++ b/main.js
@@ -3403,7 +3403,7 @@ const layerHierarchy = [
}
elem._legend = li;
- if (elem.children !== undefined && elem.children.length > 0) {
+ if (elem.children != null && elem.children.length > 0) {
if (classes.length > 0) {
li.classList.add(classes[0]);
classes = classes.slice(1);
@@ -3449,7 +3449,7 @@ const infoMetadataAccordions = [];
elem._layers = elem.layer === undefined ? []
: Array.isArray(elem.layer) ? elem.layer
: [elem.layer];
- if (elem.children !== undefined && elem.children.length > 0) {
+ if (elem.children != null && elem.children.length > 0) {
collectLayers(elem.children);
elem.children.forEach(function(child) {
child._layers.forEach((l) => elem._layers.push(l));
@@ -3580,7 +3580,7 @@ const infoMetadataAccordions = [];
const textNode = document.createTextNode(child.text);
label.appendChild(textNode);
- if (child.children !== undefined && child.children.length > 0) {
+ if (child.children != null && child.children.length > 0) {
addAccordionGroup(li, child.children);
}