From eea85681be2919cbb1dd7f876c48d142c6e33595 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Thu, 28 Feb 2013 14:24:51 -0500 Subject: [PATCH] Fix tests --- js/id/core/way.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/id/core/way.js b/js/id/core/way.js index 1e7b32efa..a44ed6545 100644 --- a/js/id/core/way.js +++ b/js/id/core/way.js @@ -123,7 +123,7 @@ _.extend(iD.Way.prototype, { var childnodes = resolver.childNodes(this); // Close unclosed way - if (close && !this.isClosed()) { + if (close && !this.isClosed() && childnodes.length) { childnodes = childnodes.concat([childnodes[0]]); }