From ceb3eb78e58b25b7e274dc243d1e7b4477c4bbf9 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 12 Aug 2022 14:34:44 +0100 Subject: [PATCH] Remove uncecessary calls to loadBudibase when registering a plugin at runtime --- packages/client/src/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/client/src/index.js b/packages/client/src/index.js index bef3ab9c12..a795d8d2d9 100644 --- a/packages/client/src/index.js +++ b/packages/client/src/index.js @@ -40,17 +40,17 @@ const loadBudibase = () => { devToolsStore.actions.setEnabled(enableDevTools) // Register any custom components - window.registerCustomComponent = plugin => { - componentStore.actions.registerCustomComponent(plugin) - console.log("registered!") - loadBudibase() - } if (window["##BUDIBASE_CUSTOM_COMPONENTS##"]) { window["##BUDIBASE_CUSTOM_COMPONENTS##"].forEach(component => { componentStore.actions.registerCustomComponent(component) }) } + // Make a callback available for custom component bundles to register + // themselves at runtime + window.registerCustomComponent = + componentStore.actions.registerCustomComponent + // Create app if one hasn't been created yet if (!app) { app = new ClientApp({