mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Only delete node type from registry if id matches
If a node is moved out of node-red core to an npm installable package, the first time NR runs after the move it correctly deletes the node-red version from the registry. However it was also removing the node constructors registered by the new npm installed version as it wasn't checking what it was removing came from the now-removed node.
This commit is contained in:
parent
369eae3d92
commit
c5d8e09b41
@ -188,8 +188,11 @@ function removeNode(id) {
|
||||
nodeList.splice(i,1);
|
||||
}
|
||||
config.types.forEach(function(t) {
|
||||
var typeId = nodeTypeToId[t];
|
||||
if (typeId === id) {
|
||||
delete nodeConstructors[t];
|
||||
delete nodeTypeToId[t];
|
||||
}
|
||||
});
|
||||
config.enabled = false;
|
||||
config.loaded = false;
|
||||
|
Loading…
Reference in New Issue
Block a user