1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #3275 from node-red-hitachi/fix-node-conflict

fix removed tab not to cause node conflict
This commit is contained in:
Nick O'Leary 2021-12-01 14:01:50 +00:00 committed by GitHub
commit 85415eb8a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -805,7 +805,6 @@ RED.nodes = (function() {
var removedGroups = []; var removedGroups = [];
if (ws) { if (ws) {
delete workspaces[id]; delete workspaces[id];
allNodes.removeTab(id);
delete linkTabMap[id]; delete linkTabMap[id];
workspacesOrder.splice(workspacesOrder.indexOf(id),1); workspacesOrder.splice(workspacesOrder.indexOf(id),1);
var i; var i;
@ -843,6 +842,7 @@ RED.nodes = (function() {
for (i=removedGroups.length-1; i>=0; i--) { for (i=removedGroups.length-1; i>=0; i--) {
removeGroup(removedGroups[i]); removeGroup(removedGroups[i]);
} }
allNodes.removeTab(id);
RED.events.emit('flows:remove',ws); RED.events.emit('flows:remove',ws);
} }
return {nodes:removedNodes,links:removedLinks, groups: removedGroups}; return {nodes:removedNodes,links:removedLinks, groups: removedGroups};