From aee37b4ea298a738e125f95146b2ccb35f6b3152 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Mar 2020 20:04:33 +0200 Subject: [PATCH] Update TradingSimulation.js --- TradingSimulation.js | 1 + 1 file changed, 1 insertion(+) diff --git a/TradingSimulation.js b/TradingSimulation.js index 3bea5733c..4182e20f5 100644 --- a/TradingSimulation.js +++ b/TradingSimulation.js @@ -1502,6 +1502,7 @@ if (parentNode !== undefined) { let phase = parentNode.takeProfit.phases[p]; + if (phase === undefined) {return} // trying to jump to a phase that does not exists. let nextPhaseEvent = phase.nextPhaseEvent; if (nextPhaseEvent !== undefined) {