diff --git a/DesignSpace/Workspace/FunctionLibraries/ReferenceAttachDetach.js b/DesignSpace/Workspace/FunctionLibraries/ReferenceAttachDetach.js index 98dadd313..576eb3214 100644 --- a/DesignSpace/Workspace/FunctionLibraries/ReferenceAttachDetach.js +++ b/DesignSpace/Workspace/FunctionLibraries/ReferenceAttachDetach.js @@ -19,8 +19,12 @@ function newReferenceAttachDetach () { } function completeDetachment (node) { - if (node.payload !== undefined && node.payload.referenceParent.payload !== undefined && node.payload.referenceParent.payload.uiObject !== undefined) { - node.payload.referenceParent.payload.uiObject.isShowing = false + if (node.payload !== undefined !== undefined) { + if (node.payload.referenceParent.payload !== undefined) { + if (node.payload.referenceParent.payload.uiObject !== undefined) { + node.payload.referenceParent.payload.uiObject.isShowing = false + } + } } node.payload.referenceParent = undefined