Skip to content

Commit 707017b

Browse files
authored
Update BuildingShapeUtils.js
1 parent a4ff57e commit 707017b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/extras/BuildingShapeUtils.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ class BuildingShapeUtils extends ShapeUtils {
5757
* @return {boolean}
5858
*/
5959
static isSelfIntersecting(way) {
60+
const nodes = way.getElementsByTagName('nd');
6061
if (BuildingShapeUtils.isClosed(way)){
61-
// Drop the final node.
62+
nodes.pop();
6263
}
63-
// create empty array
64+
const refs = [];
65+
6466
// foreach (node in way)
6567
// if (the ref value exists in the array)
6668
// return true;

0 commit comments

Comments
 (0)