Skip to content

Commit bf4a067

Browse files
authored
Update BuildingShapeUtils.js
1 parent 2be96fa commit bf4a067

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/extras/BuildingShapeUtils.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,12 @@ class BuildingShapeUtils extends ShapeUtils {
6262
nodes.pop();
6363
}
6464
const refs = new Set();
65-
for (let i = 0; i < nodes.length - 1; i++) {
66-
if (refs.has(nodes[i].getAttribute('ref'))){
65+
for (const node of nodes) {
66+
const ref = node.getAttribute('ref');
67+
if (refs.has(ref)){
6768
return true;
6869
}
69-
refs.add(nodes[i].getAttribute('ref'));
70+
refs.add(ref);
7071
}
7172
return false;
7273
}

0 commit comments

Comments
 (0)