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

Fix RED.nodes.clear() when handling locked flows

This commit is contained in:
Nick O'Leary 2022-12-03 21:44:33 +00:00
parent 6bd67ae68c
commit 3630056ed8
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -2560,11 +2560,17 @@ RED.nodes = (function() {
junctions = {};
junctionsByZ = {};
var workspaceIds = Object.keys(workspaces);
// Ensure all workspaces are unlocked so we don't get any edit-protection
// preventing removal
workspaceIds.forEach(function(id) {
workspaces[id].locked = false
});
var subflowIds = Object.keys(subflows);
subflowIds.forEach(function(id) {
RED.subflow.removeSubflow(id)
});
var workspaceIds = Object.keys(workspaces);
workspaceIds.forEach(function(id) {
RED.workspaces.remove(workspaces[id]);
});