From 0db5193e0c7aa7806c3d8063b9f5e02bb67eecd5 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Fri, 7 Dec 2012 14:16:11 -0500 Subject: [PATCH] Fix parentRelations --- js/id/graph/graph.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/id/graph/graph.js b/js/id/graph/graph.js index 593124927..d5ea1dcf8 100644 --- a/js/id/graph/graph.js +++ b/js/id/graph/graph.js @@ -31,7 +31,8 @@ iD.Graph.prototype = { parentRelations: function(id) { // This is slow and a bad hack. return _.filter(this.entities, function(e) { - return e && e.type === 'relation' && e.members.indexOf(id) !== -1; + return e && e.type === 'relation' && + _.pluck(e.members, 'id').indexOf(id) !== -1; }); },