Skip to content

Commit c268a47

Browse files
authored
Update BuildingShapeUtils.js
1 parent 20047dc commit c268a47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extras/BuildingShapeUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class BuildingShapeUtils extends ShapeUtils {
3030
nodes.push(nodelist[ref]);
3131
}
3232
// If the first and last point are identical, remove the last copy.
33-
if (nodes[0][0] === nodes[elements.length - 1][0] && nodes[0][1] === nodes[elements.length - 1][1]) {
33+
if (nodes.length > 1 && nodes[0][0] === nodes[elements.length - 1][0] && nodes[0][1] === nodes[elements.length - 1][1]) {
3434
nodes.pop();
3535
}
3636
let first = true;

0 commit comments

Comments
 (0)