diff --git a/src/routes/(app)/workspace/functions/create/+page.svelte b/src/routes/(app)/workspace/functions/create/+page.svelte index 118668c83..49711b8ae 100644 --- a/src/routes/(app)/workspace/functions/create/+page.svelte +++ b/src/routes/(app)/workspace/functions/create/+page.svelte @@ -48,6 +48,10 @@ console.log(func); }); + if (window.opener ?? false) { + window.opener.postMessage('loaded', '*'); + } + if (sessionStorage.function) { func = JSON.parse(sessionStorage.function); sessionStorage.removeItem('function'); @@ -61,14 +65,16 @@ {#if mounted} - { - saveHandler(e.detail); - }} - /> + {#key func?.content} + { + saveHandler(e.detail); + }} + /> + {/key} {/if} diff --git a/src/routes/(app)/workspace/tools/create/+page.svelte b/src/routes/(app)/workspace/tools/create/+page.svelte index daa6b7acd..a3e243c21 100644 --- a/src/routes/(app)/workspace/tools/create/+page.svelte +++ b/src/routes/(app)/workspace/tools/create/+page.svelte @@ -45,6 +45,10 @@ console.log(tool); }); + if (window.opener ?? false) { + window.opener.postMessage('loaded', '*'); + } + if (sessionStorage.tool) { tool = JSON.parse(sessionStorage.tool); sessionStorage.removeItem('tool'); @@ -58,14 +62,16 @@ {#if mounted} - { - saveHandler(e.detail); - }} - /> + {#key tool?.content} + { + saveHandler(e.detail); + }} + /> + {/key} {/if}