|
@@ -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 @@
|
|
|
</script>
|
|
|
|
|
|
{#if mounted}
|
|
|
- <FunctionEditor
|
|
|
- id={func?.id ?? ''}
|
|
|
- name={func?.name ?? ''}
|
|
|
- meta={func?.meta ?? { description: '' }}
|
|
|
- content={func?.content ?? ''}
|
|
|
- {clone}
|
|
|
- on:save={(e) => {
|
|
|
- saveHandler(e.detail);
|
|
|
- }}
|
|
|
- />
|
|
|
+ {#key func?.content}
|
|
|
+ <FunctionEditor
|
|
|
+ id={func?.id ?? ''}
|
|
|
+ name={func?.name ?? ''}
|
|
|
+ meta={func?.meta ?? { description: '' }}
|
|
|
+ content={func?.content ?? ''}
|
|
|
+ {clone}
|
|
|
+ on:save={(e) => {
|
|
|
+ saveHandler(e.detail);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ {/key}
|
|
|
{/if}
|