From 22679fdf676e3c9798d7d4b717a55d87c6aa586d Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Tue, 25 Aug 2020 11:25:56 +0200 Subject: [PATCH] adds guards to some properties when they are undefined --- packages/builder/src/builderStore/fetchBindableProperties.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/builderStore/fetchBindableProperties.js b/packages/builder/src/builderStore/fetchBindableProperties.js index 6e5444a91d..bd8cb20fd3 100644 --- a/packages/builder/src/builderStore/fetchBindableProperties.js +++ b/packages/builder/src/builderStore/fetchBindableProperties.js @@ -115,7 +115,7 @@ const walk = ({ instance, targetId, components, models, result }) => { // found it result.target = instance } else { - if (component.bindable) { + if (component && component.bindable) { // pushing all components in here initially // but this will not be correct, as some of // these components will be in another context @@ -129,7 +129,7 @@ const walk = ({ instance, targetId, components, models, result }) => { } // a component that provides context to it's children - const contextualInstance = component.context && instance[component.context] + const contextualInstance = component && component.context && instance[component.context] if (contextualInstance) { // add to currentContexts (ancestory of context)