From 0d027d9567eaf0be1248febc43cf428d82d6a3a9 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Tue, 28 Jan 2020 14:09:46 +0000 Subject: [PATCH] new render wrapper - bug fix --- packages/client/src/index.js | 6 +++++- packages/client/src/render/renderComponent.js | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/client/src/index.js b/packages/client/src/index.js index e75f9a08ab..aba4906680 100644 --- a/packages/client/src/index.js +++ b/packages/client/src/index.js @@ -35,7 +35,11 @@ export const loadBudibase = async ({ props = appDefinition.props; } - const _app = createApp(componentLibraries, appDefinition, user, uiFunctions); + const _app = createApp( + componentLibraries, + appDefinition, + user, + uiFunctions || {}); _app.hydrateChildren( [props], window.document.body); diff --git a/packages/client/src/render/renderComponent.js b/packages/client/src/render/renderComponent.js index 890ed4037f..3ed66ac517 100644 --- a/packages/client/src/render/renderComponent.js +++ b/packages/client/src/render/renderComponent.js @@ -4,7 +4,10 @@ export const renderComponent = ({ htmlElement, anchor, parentContext, componentProps}) => { - const func = uiFunctions[componentProps._id]; + const func = componentProps._id + ? uiFunctions[componentProps._id] + : undefined; + let component; let componentContext; const render = (context) => {