diff --git a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js index 60c293b6a..1842d2068 100644 --- a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js +++ b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js @@ -20,6 +20,7 @@ function newFoundationsFunctionLibraryReferenceAttachDetach() { // Store the path to the reference parent to make restoring it possible if the reference parent is updated and given a new id function storeAttachNodePath(node, attachToNode) { + if (node === undefined) { return } if (node.payload === undefined) { return } let attachNodePath = UI.projects.foundations.utilities.hierarchy.getNodeNameTypePath(attachToNode) // Remove unused node id, and project tag from stored path @@ -33,6 +34,8 @@ function newFoundationsFunctionLibraryReferenceAttachDetach() { // Clear the path to reference parent when the reference is cleared function cleanAttachNodePath(node) { + if (node === undefined) { return } + if (node.payload === undefined) { return } if (node.payload !== undefined) { node.payload.referenceParentCombinedNodePath = undefined if (node.savedPayload !== undefined) { diff --git a/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js b/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js index 3b4ad930c..bb32b8d12 100644 --- a/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js +++ b/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js @@ -599,7 +599,7 @@ function newFoundationsFunctionLibraryUiObjectsFromNodes() { let schemaDocument = getSchemaDocument(object, project) if (schemaDocument === undefined) { - console.log('Cannot addUIOBject of ' + type + ' because that type it is not defined at the APP_SCHEMA.') + console.log('Cannot addUIOBject of type "' + type + '" and project "' + project + '"because that type it is not defined at the APP_SCHEMA.') return } @@ -627,7 +627,7 @@ function newFoundationsFunctionLibraryUiObjectsFromNodes() { parentSchemaDocument = getSchemaDocument(parentNode, parentNode.project) if (parentSchemaDocument === undefined) { - console.log('Cannot addUIOBject from parent of ' + type + ' because that type it is not defined at the APP_SCHEMA.') + console.log('Cannot addUIOBject from parent of type "' + type + '" and project "' + parentNode.project + '" because that type it is not defined at the APP_SCHEMA.') return } checkChainToSelfTypeCollection()