Clear context in node test helper

Fixes #858
This commit is contained in:
Nick O'Leary
2016-07-03 23:08:53 +01:00
parent c05e9da9c5
commit f62cf6818b
2 changed files with 8 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ function getContext(localId,flowId) {
if (flowId) {
contextId = localId+":"+flowId;
}
if (contexts[contextId]) {
if (contexts.hasOwnProperty(contextId)) {
return contexts[contextId];
}
var newContext = createContext(contextId);
@@ -65,7 +65,7 @@ function clean(flowConfig) {
for (var id in contexts) {
if (contexts.hasOwnProperty(id)) {
var idParts = id.split(":");
if (!flowConfig.allNodes[idParts[0]]) {
if (!flowConfig.allNodes.hasOwnProperty(idParts[0])) {
delete contexts[id];
}
}