From 6e044f36077957dcdb4e0ac181b3bc037cbbb7b4 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Sat, 12 Jan 2013 10:55:18 -0800 Subject: [PATCH] Store flag on _parentWays itself, fixes #392 Relying here on the fact that `calculated` will never collide with an actual entity ID. --- js/id/graph/graph.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/id/graph/graph.js b/js/id/graph/graph.js index cf3ed96f8..37f430c0f 100644 --- a/js/id/graph/graph.js +++ b/js/id/graph/graph.js @@ -41,7 +41,7 @@ iD.Graph.prototype = { ent, id; - if (!graph.calculatedParentWays) { + if (!this._parentWays.calculated) { for (var i in graph.entities) { ent = graph.entities[i]; if (ent && ent.type === 'way') { @@ -54,7 +54,7 @@ iD.Graph.prototype = { } } } - graph.calculatedParentWays = true; + this._parentWays.calculated = true; } return this._parentWays[entity.id] || [];