diff --git a/packages/builder/src/builderStore/store.js b/packages/builder/src/builderStore/store.js index 9269c3ffcc..56a755e886 100644 --- a/packages/builder/src/builderStore/store.js +++ b/packages/builder/src/builderStore/store.js @@ -467,11 +467,11 @@ const _saveScreen = (store, s, screen) => { api .post(`/_builder/api/${s.appname}/pages/${s.currentPageName}/screen`, screen) .then(async savedScreen => { + _savePage(s); const updatedScreen = await savedScreen.json(); const screens = [...currentPageScreens.filter(storeScreen => storeScreen.name !== updatedScreen.name), updatedScreen]; s.pages[s.currentPageName]._screens = screens s.screens = screens - _savePage(s); }); return s diff --git a/packages/server/appPackages/testApp/public/main/clientFrontendDefinition.js b/packages/server/appPackages/testApp/public/main/clientFrontendDefinition.js new file mode 100644 index 0000000000..60b0b5c6eb --- /dev/null +++ b/packages/server/appPackages/testApp/public/main/clientFrontendDefinition.js @@ -0,0 +1,2 @@ +window['##BUDIBASE_FRONTEND_DEINITION##'] = {"componentLibraries":[{"importPath":"/lib/customComponents/index.js","libName":"./customComponents"},{"importPath":"/lib/moreCustomComponents/index.js","libName":"./moreCustomComponents"}],"appRootPath":"","page":{"title":"Test App","favicon":"./_shared/favicon.png","stylesheets":["my-styles.css"],"componentLibraries":["./customComponents","./moreCustomComponents"],"props":{"_component":"@budibase/standard-components/div"}},"screens":[{"name":"screen1","description":"","props":{"_component":"@budibase/standard-components/div","className":""},"_css":"/css/d121e1ecc6cf44f433213222e9ff5d40.css"},{"name":"screen2","description":"","props":{"_component":"@budibase/standard-components/div","className":""},"_css":"/css/7b7c05b78e05c06eb8d69475caadfea3.css"}]}; +window['##BUDIBASE_FRONTEND_FUNCTIONS##'] = {'1234':() => 'test return'} \ No newline at end of file