From 63d8ba524907e69386f5486746be8532da411acc Mon Sep 17 00:00:00 2001 From: Kevin Nowaczyk Date: Thu, 9 May 2024 13:16:22 -0400 Subject: [PATCH] Update BuildingShapeUtils.js --- src/extras/BuildingShapeUtils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/extras/BuildingShapeUtils.js b/src/extras/BuildingShapeUtils.js index 7be16ca..0c63891 100644 --- a/src/extras/BuildingShapeUtils.js +++ b/src/extras/BuildingShapeUtils.js @@ -47,7 +47,7 @@ class BuildingShapeUtils extends ShapeUtils { static isClosed(way) { // Get all the nodes in the way of interest const elements = way.getElementsByTagName('nd'); - return elements[0].getAttribute('ref') == elements[elements.length - 1].getAttribute('ref') + return elements[0].getAttribute('ref') === elements[elements.length - 1].getAttribute('ref'); } /** @@ -60,14 +60,14 @@ class BuildingShapeUtils extends ShapeUtils { static combineWays(ways) { var output = []; for (let i = 0; i < ways.length; i++) { - if (isClosed(ways[i])) { - output.push(ways[i]) + if (BuildingShapeUtils.isClosed(ways[i])) { + output.push(ways[i]); } else { } } } - + /** * Find the center of a closed way *