From bc430e492644772de7e07e2aabfdda0b49c155b4 Mon Sep 17 00:00:00 2001 From: J Guthrie Date: Tue, 22 Jan 2019 14:50:13 +0000 Subject: [PATCH] Fix loop index bug --- modules/actions/join.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/actions/join.js b/modules/actions/join.js index 296b6e6f5..cee8a7aa7 100644 --- a/modules/actions/join.js +++ b/modules/actions/join.js @@ -76,10 +76,10 @@ export function actionJoin(ids) { // between all pairs for (var i = 0; i < ids.length-1; i++) { for (var j = i+1; j < ids.length; j++) { - var path1 = graph.childNodes(graph.entity(ids[0])).map(function(e) { + var path1 = graph.childNodes(graph.entity(ids[i])).map(function(e) { return e.loc; }); - var path2 = graph.childNodes(graph.entity(ids[1])).map(function(e) { + var path2 = graph.childNodes(graph.entity(ids[j])).map(function(e) { return e.loc; }); var intersections = geoPathIntersections(path1, path2);