Update UiObjectsFromNodes.js

This commit is contained in:
Luis Fernando Molina committed 2020-04-16 10:00:13 +02:00
1 parent ad8a73a8c1
commit abb05c7e77
1 file changed
+6 -2
@@ -547,7 +547,9 @@ function newUiObjectsFromNodes () {
if (userAddingNew === false && uiObjectType === 'Task' && node.savedPayload !== undefined) {
if (node.savedPayload.uiObject.isRunning === true) {
if (node.payload.parentNode !== undefined) {
tasksToRun.push(node)
if (tasksToRun !== undefined) { // it might be undefined when you are spawning a task that was running while backed up
tasksToRun.push(node)
}
}
}
}
@@ -557,7 +559,9 @@ function newUiObjectsFromNodes () {
if (uiObjectType === 'Live Trading Session' || uiObjectType === 'Fordward Testing Session' || uiObjectType === 'Backtesting Session' || uiObjectType === 'Paper Trading Session') {
if (node.savedPayload.uiObject.isRunning === true) {
if (node.payload.parentNode !== undefined) {
sessionsToRun.push(node)
if (sessionsToRun !== undefined) { // it might be undefined when you are spawning a session that was running while backed up
sessionsToRun.push(node)
}
}
}
}