diff --git a/js/apps/system/aardvark/frontend/js/graphViewer/graph/eventLibrary.js b/js/apps/system/aardvark/frontend/js/graphViewer/graph/eventLibrary.js index 4bccb490d7..0c4e6200cc 100644 --- a/js/apps/system/aardvark/frontend/js/graphViewer/graph/eventLibrary.js +++ b/js/apps/system/aardvark/frontend/js/graphViewer/graph/eventLibrary.js @@ -132,7 +132,7 @@ function EventLibrary() { } adapter.createNode(d, function(newNode) { nodeShaper.reshapeNodes(); - callback(newNode); + cb(newNode); }); }; }; diff --git a/js/apps/system/aardvark/frontend/js/graphViewer/jasmine_test/specEvents/eventLibrarySpec.js b/js/apps/system/aardvark/frontend/js/graphViewer/jasmine_test/specEvents/eventLibrarySpec.js index d8ea03b6f8..217222ef69 100644 --- a/js/apps/system/aardvark/frontend/js/graphViewer/jasmine_test/specEvents/eventLibrarySpec.js +++ b/js/apps/system/aardvark/frontend/js/graphViewer/jasmine_test/specEvents/eventLibrarySpec.js @@ -213,20 +213,21 @@ callbackCheck = function() { called = true; }, - nodeEditorConfig = { - nodes: nodes, - adapter: adapterDummy, - shaper: nodeShaperDummy - }, testee; - adapterDummy.createNode = function(nodeToCreate, callback) { - created = nodeToCreate; - nodes.push(created); - callback(created); - }; - runs(function() { + adapterDummy.createNode = function(nodeToCreate, callback) { + created = nodeToCreate; + nodes.push(created); + callback(created); + }; + + var nodeEditorConfig = { + nodes: nodes, + adapter: adapterDummy, + shaper: nodeShaperDummy + }; + testee = eventLib.InsertNode(nodeEditorConfig); testee(callbackCheck); });