diff --git a/red/nodes/registry/registry.js b/red/nodes/registry/registry.js index fe630d4ca..3343eb2e7 100644 --- a/red/nodes/registry/registry.js +++ b/red/nodes/registry/registry.js @@ -188,8 +188,11 @@ function removeNode(id) { nodeList.splice(i,1); } config.types.forEach(function(t) { - delete nodeConstructors[t]; - delete nodeTypeToId[t]; + var typeId = nodeTypeToId[t]; + if (typeId === id) { + delete nodeConstructors[t]; + delete nodeTypeToId[t]; + } }); config.enabled = false; config.loaded = false;