From 852a00bdfb21aed2f06b9848747fce5da89ecc38 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 8 Oct 2019 12:55:00 +0200 Subject: [PATCH] Bug Fixes, bots with their own code now working --- .../Workspace/FunctionLibraries/ProtocolNode.js | 12 ++++++++++++ .../Workspace/FunctionLibraries/StringifyNode.js | 3 +++ 2 files changed, 15 insertions(+) diff --git a/StrategySpace/Workspace/FunctionLibraries/ProtocolNode.js b/StrategySpace/Workspace/FunctionLibraries/ProtocolNode.js index bdca9fcd2..0e57a98dd 100644 --- a/StrategySpace/Workspace/FunctionLibraries/ProtocolNode.js +++ b/StrategySpace/Workspace/FunctionLibraries/ProtocolNode.js @@ -529,6 +529,7 @@ function newProtocolNode () { type: node.type, subType: node.subType, name: node.name, + code: node.code, processes: [] } @@ -536,6 +537,9 @@ function newProtocolNode () { let process = getProtocolNode(node.processes[m], removePersonalData, parseJSONStrings, includeIds) bot.processes.push(process) } + if (parseJSONStrings) { + bot.code = JSON.parse(bot.code) + } if (includeIds) { bot.id = node.id } @@ -546,6 +550,7 @@ function newProtocolNode () { type: node.type, subType: node.subType, name: node.name, + code: node.code, processes: [] } @@ -553,6 +558,9 @@ function newProtocolNode () { let process = getProtocolNode(node.processes[m], removePersonalData, parseJSONStrings, includeIds) bot.processes.push(process) } + if (parseJSONStrings) { + bot.code = JSON.parse(bot.code) + } if (includeIds) { bot.id = node.id } @@ -563,6 +571,7 @@ function newProtocolNode () { type: node.type, subType: node.subType, name: node.name, + code: node.code, processes: [] } @@ -570,6 +579,9 @@ function newProtocolNode () { let process = getProtocolNode(node.processes[m], removePersonalData, parseJSONStrings, includeIds) bot.processes.push(process) } + if (parseJSONStrings) { + bot.code = JSON.parse(bot.code) + } if (includeIds) { bot.id = node.id } diff --git a/StrategySpace/Workspace/FunctionLibraries/StringifyNode.js b/StrategySpace/Workspace/FunctionLibraries/StringifyNode.js index 8acf0cc7c..b243f3286 100644 --- a/StrategySpace/Workspace/FunctionLibraries/StringifyNode.js +++ b/StrategySpace/Workspace/FunctionLibraries/StringifyNode.js @@ -501,6 +501,7 @@ function newStringifyNode () { type: node.type, subType: node.subType, name: node.name, + code: node.code, processes: [], savedPayload: getSavedPayload(node) } @@ -518,6 +519,7 @@ function newStringifyNode () { type: node.type, subType: node.subType, name: node.name, + code: node.code, processes: [], savedPayload: getSavedPayload(node) } @@ -535,6 +537,7 @@ function newStringifyNode () { type: node.type, subType: node.subType, name: node.name, + code: node.code, processes: [], savedPayload: getSavedPayload(node) }