From 0ecd9673b84435f645bb45984e5237b0c3572017 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 21 Oct 2020 10:36:47 +0100 Subject: [PATCH] Only apply recovery tab on initial load Fixes #2731 --- packages/node_modules/@node-red/editor-client/src/js/nodes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/nodes.js b/packages/node_modules/@node-red/editor-client/src/js/nodes.js index 2ca8d7727..1055c20ad 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/nodes.js +++ b/packages/node_modules/@node-red/editor-client/src/js/nodes.js @@ -1050,6 +1050,7 @@ RED.nodes = (function() { * Options: * - generateIds - whether to replace all node ids * - addFlow - whether to import nodes to a new tab + * - importToCurrent * - importMap - how to resolve any conflicts. * - id:import - import as-is * - id:copy - import with new id @@ -1153,7 +1154,7 @@ RED.nodes = (function() { if (n.z) { nodeZmap[n.z] = nodeZmap[n.z] || []; nodeZmap[n.z].push(n); - } else if (n.hasOwnProperty('x') && n.hasOwnProperty('y') && !n.z) { + } else if (isInitialLoad && n.hasOwnProperty('x') && n.hasOwnProperty('y') && !n.z) { // Hit the rare issue where node z values get set to 0. // Repair the flow - but we really need to track that down. if (!recoveryWorkspace) {