From 7b83d322845fdef85110a37813b14e0ef2488280 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 23 Jun 2020 14:27:39 +0200 Subject: [PATCH] Bug fixed --- Plotting/NodesErrors.js | 1 + Plotting/NodesProgress.js | 1 + Plotting/NodesRunning.js | 1 + Plotting/NodesStatus.js | 1 + Plotting/NodesValues.js | 1 + Plotting/Plotter.js | 7 ++----- Plotting/RecordValues.js | 1 + 7 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Plotting/NodesErrors.js b/Plotting/NodesErrors.js index 435bd9212..7ba365848 100644 --- a/Plotting/NodesErrors.js +++ b/Plotting/NodesErrors.js @@ -34,6 +34,7 @@ function newNodesErrors () { function applyValue (nodeId, value) { let node = hiriarchyMap.get(nodeId) + if (node === undefined) { return } if (node.payload === undefined) { return } if (node.payload.uiObject === undefined) { return } if (value === '') { diff --git a/Plotting/NodesProgress.js b/Plotting/NodesProgress.js index d4f08dc9d..57df4759f 100644 --- a/Plotting/NodesProgress.js +++ b/Plotting/NodesProgress.js @@ -35,6 +35,7 @@ function newNodesProgress () { function applyValue (nodeId, value) { let node = hiriarchyMap.get(nodeId) + if (node === undefined) { return } if (node.payload === undefined) { return } if (node.payload.uiObject === undefined) { return } if (value === true) { value = 'true' } diff --git a/Plotting/NodesRunning.js b/Plotting/NodesRunning.js index e2694910e..862753643 100644 --- a/Plotting/NodesRunning.js +++ b/Plotting/NodesRunning.js @@ -35,6 +35,7 @@ function newNodesRunning () { function applyValue (nodeId, value) { let node = hiriarchyMap.get(nodeId) + if (node === undefined) { return } if (node.payload === undefined) { return } if (node.payload.uiObject === undefined) { return } if (value === true) { value = 'true' } diff --git a/Plotting/NodesStatus.js b/Plotting/NodesStatus.js index cb86bc1bd..0544c1114 100644 --- a/Plotting/NodesStatus.js +++ b/Plotting/NodesStatus.js @@ -35,6 +35,7 @@ function newNodesStatus () { function applyValue (nodeId, value) { let node = hiriarchyMap.get(nodeId) + if (node === undefined) { return } if (node.payload === undefined) { return } if (node.payload.uiObject === undefined) { return } if (value === true) { value = 'true' } diff --git a/Plotting/NodesValues.js b/Plotting/NodesValues.js index 6ce4c139d..eb97dfeeb 100644 --- a/Plotting/NodesValues.js +++ b/Plotting/NodesValues.js @@ -35,6 +35,7 @@ function newNodesValues () { function applyValue (nodeId, value) { let node = hiriarchyMap.get(nodeId) + if (node === undefined) { return } if (node.payload === undefined) { return } if (node.payload.uiObject === undefined) { return } if (value === true) { value = 'true' } diff --git a/Plotting/Plotter.js b/Plotting/Plotter.js index 9171fbf4e..bdb2d3d05 100644 --- a/Plotting/Plotter.js +++ b/Plotting/Plotter.js @@ -252,6 +252,7 @@ function newPlotter () { } function recalculate () { + if (canvas.chartingSpace.visible !== true) { return } try { if (timeFrame >= _1_HOUR_IN_MILISECONDS) { recalculateUsingMarketFiles() @@ -873,11 +874,7 @@ function newPlotter () { } function onDragFinished () { - try { - recalculate() - } catch (err) { - if (ERROR_LOG === true) { logger.write('[ERROR] onDragFinished -> err = ' + err.stack) } - } + recalculate() } function onDisplace (event) { diff --git a/Plotting/RecordValues.js b/Plotting/RecordValues.js index b66ba150f..1d2fd6bec 100644 --- a/Plotting/RecordValues.js +++ b/Plotting/RecordValues.js @@ -52,6 +52,7 @@ function newRecordValues () { } function applyValue (node, value) { + if (node === undefined) { return } if (node === undefined) { return } if (node.payload === undefined) { return } if (node.payload.uiObject === undefined) { return }