From f6974d43f46a1be537f19c4b805c03c0f819e2e7 Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Sat, 20 Dec 2025 14:29:13 -0800 Subject: [PATCH] Refactor long line --- html/images/space.svg | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/html/images/space.svg b/html/images/space.svg index 4034ac5..1a73354 100644 --- a/html/images/space.svg +++ b/html/images/space.svg @@ -465,9 +465,13 @@ const x2 = l.getAttribute('x2'); const y2 = l.getAttribute('y2'); const str = `${x1},${y1} ${x2},${y2}`; - if (mappedEdges.includes(str) && (lineContainer.childElementCount < 4 || !collisionEdges.includes(str))) { - l.remove(); - } + + if (mappedEdges.includes(str)) + if ([ + lineContainer.childElementCount <= collisionEdges.length, + !collisionEdges.includes(str) + ].some(c => c)) + l.remove(); }); if (restart) {