diff --git a/DesignSpace/Workspace/FunctionLibraries/CryptoEcosystemFunctions.js b/DesignSpace/Workspace/FunctionLibraries/CryptoEcosystemFunctions.js index 544347a5e..f7503e608 100644 --- a/DesignSpace/Workspace/FunctionLibraries/CryptoEcosystemFunctions.js +++ b/DesignSpace/Workspace/FunctionLibraries/CryptoEcosystemFunctions.js @@ -377,9 +377,19 @@ function newCryptoEcosystemFunctions() { for (let i = 0; i < timeMachines.length; i++) { let timeMachine = timeMachines[i] let session = timeMachine.payload.referenceParent - if (session === undefined) {continue} + if (session === undefined) { + /* + This is what usually happens, that the intall process make these + time machines to lose their reference parent since the install + process deletes them. + */ + functionLibraryNodeDeleter.deleteUIObject(timeMachine, rootNodes) + continue + } let marketTradingTasks = findNodeInNodeMesh(session, 'Market Trading Tasks', undefined, true, false, true, false) - if (marketTradingTasks.payload.referenceParent === undefined) {continue} + if (marketTradingTasks === undefined) {continue} + if (marketTradingTasks.payload === undefined) {continue} + if (marketTradingTasks.payload.referenceParent === undefined) { continue } if (marketTradingTasks.payload.referenceParent.id === market.id) { functionLibraryNodeDeleter.deleteUIObject(timeMachine, rootNodes) } diff --git a/Utilities/Meshes.js b/Utilities/Meshes.js index f0d474ff9..44144bf95 100644 --- a/Utilities/Meshes.js +++ b/Utilities/Meshes.js @@ -11,6 +11,7 @@ function findNodeInNodeMesh(node, nodeType, nodeName, connectedViaPayload, findI function scanNodeMesh(startingNode, depth) { if (startingNode === undefined) { return } + if (startingNode.payload === undefined) { return } if (nodeFound !== undefined) { return } if (depth >= MAX_DEPTH) {return}