Fix close() for single node ways

This commit is contained in:
Bryan Housel
2017-01-12 15:56:46 +05:30
parent cadb38009a
commit f109efda7b
2 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -193,8 +193,8 @@ _.extend(osmWay.prototype, {
if (this.isClosed() || !this.nodes.length) return this;
var nodes = this.nodes.slice();
nodes.push(nodes[0]);
nodes = nodes.filter(noRepeatNodes);
nodes.push(nodes[0]);
return this.update({ nodes: nodes });
},