Skip to content

Commit 74c2ac2

Browse files
committed
fix problem in edge compability (#50)
1 parent 7099715 commit 74c2ac2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/components/blocks/blocks.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,10 @@ Blocks.prototype.importProcessGraph = function(processGraph, registry) {
837837

838838
// Import edges
839839
var nodes = pg.getNodes();
840-
for(let i in nodes) {
841-
var node = nodes[i];
840+
// iterating directly through nodes causes error in Edge. Using keys instead
841+
var keys = Object.keys(nodes);
842+
keys.forEach(function(key) {
843+
var node = nodes[key];
842844

843845
var args = node.getArgumentNames();
844846
for(let i in args) {
@@ -867,7 +869,7 @@ Blocks.prototype.importProcessGraph = function(processGraph, registry) {
867869
break;
868870
}
869871
}
870-
}
872+
}, this);
871873
},
872874

873875
Blocks.prototype.importNodesFromProcessGraph = function(nodes, x = 0, y = 0) {

0 commit comments

Comments
 (0)