Browse Source

Fix reinstantiating app when builder props change

master
Andrew Kingston 6 years ago
parent
commit
99c167c54f
  1. 11
      packages/client/src/index.js

11
packages/client/src/index.js

@ -1,9 +1,14 @@
import ClientApp from "./components/ClientApp.svelte"
// Initialise client app
let app
const loadBudibase = () => {
window.document.body.innerHTML = ""
new ClientApp({
// Destroy old app if one exists
if (app) {
app.$destroy()
}
// Create new app
app = new ClientApp({
target: window.document.body,
})
}

Loading…
Cancel
Save