@ -425,13 +425,13 @@ class NodesHandler {
let nodeObj = { } ; // used to quickly check if node already exists
let nodeObj = { } ; // used to quickly check if node already exists
for ( let i = 0 ; i < node . edges . length ; i ++ ) {
for ( let i = 0 ; i < node . edges . length ; i ++ ) {
let edge = node . edges [ i ] ;
let edge = node . edges [ i ] ;
if ( direction !== 'from ' && edge . toId == node . id ) { // these are double equals since ids can be numeric or string
if ( direction !== 'to ' && edge . toId == node . id ) { // these are double equals since ids can be numeric or string
if ( nodeObj [ edge . fromId ] === undefined ) {
if ( nodeObj [ edge . fromId ] === undefined ) {
nodeList . push ( edge . fromId ) ;
nodeList . push ( edge . fromId ) ;
nodeObj [ edge . fromId ] = true ;
nodeObj [ edge . fromId ] = true ;
}
}
}
}
else if ( direction !== 'to ' && edge . fromId == node . id ) { // these are double equals since ids can be numeric or string
else if ( direction !== 'from ' && edge . fromId == node . id ) { // these are double equals since ids can be numeric or string
if ( nodeObj [ edge . toId ] === undefined ) {
if ( nodeObj [ edge . toId ] === undefined ) {
nodeList . push ( edge . toId ) ;
nodeList . push ( edge . toId ) ;
nodeObj [ edge . toId ] = true ;
nodeObj [ edge . toId ] = true ;