Remove uncecessary calls to loadBudibase when registering a plugin at runtime
This commit is contained in:
parent
10440803fe
commit
ceb3eb78e5
|
@ -40,17 +40,17 @@ const loadBudibase = () => {
|
||||||
devToolsStore.actions.setEnabled(enableDevTools)
|
devToolsStore.actions.setEnabled(enableDevTools)
|
||||||
|
|
||||||
// Register any custom components
|
// Register any custom components
|
||||||
window.registerCustomComponent = plugin => {
|
|
||||||
componentStore.actions.registerCustomComponent(plugin)
|
|
||||||
console.log("registered!")
|
|
||||||
loadBudibase()
|
|
||||||
}
|
|
||||||
if (window["##BUDIBASE_CUSTOM_COMPONENTS##"]) {
|
if (window["##BUDIBASE_CUSTOM_COMPONENTS##"]) {
|
||||||
window["##BUDIBASE_CUSTOM_COMPONENTS##"].forEach(component => {
|
window["##BUDIBASE_CUSTOM_COMPONENTS##"].forEach(component => {
|
||||||
componentStore.actions.registerCustomComponent(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
|
// Create app if one hasn't been created yet
|
||||||
if (!app) {
|
if (!app) {
|
||||||
app = new ClientApp({
|
app = new ClientApp({
|
||||||
|
|
Loading…
Reference in New Issue