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

Only apply recovery tab on initial load

Fixes #2731
This commit is contained in:
Nick O'Leary 2020-10-21 10:36:47 +01:00
parent 97aa1230ef
commit 0ecd9673b8
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -1050,6 +1050,7 @@ RED.nodes = (function() {
* Options: * Options:
* - generateIds - whether to replace all node ids * - generateIds - whether to replace all node ids
* - addFlow - whether to import nodes to a new tab * - addFlow - whether to import nodes to a new tab
* - importToCurrent
* - importMap - how to resolve any conflicts. * - importMap - how to resolve any conflicts.
* - id:import - import as-is * - id:import - import as-is
* - id:copy - import with new id * - id:copy - import with new id
@ -1153,7 +1154,7 @@ RED.nodes = (function() {
if (n.z) { if (n.z) {
nodeZmap[n.z] = nodeZmap[n.z] || []; nodeZmap[n.z] = nodeZmap[n.z] || [];
nodeZmap[n.z].push(n); 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. // Hit the rare issue where node z values get set to 0.
// Repair the flow - but we really need to track that down. // Repair the flow - but we really need to track that down.
if (!recoveryWorkspace) { if (!recoveryWorkspace) {