diff --git a/red/runtime/nodes/context/memory.js b/red/runtime/nodes/context/memory.js index 422b1b9f2..74a8a4380 100644 --- a/red/runtime/nodes/context/memory.js +++ b/red/runtime/nodes/context/memory.js @@ -77,7 +77,7 @@ Memory.prototype.clean = function(activeNodes){ for(var id in this.data){ if(this.data.hasOwnProperty(id) && id !== "global"){ var idParts = id.split(":"); - if(!activeNodes.indexOf(idParts[0])){ + if(activeNodes.indexOf(idParts[0]) === -1){ delete this.data[id]; } }