Skip to content

Commit

Permalink
fix editor mount callback
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoperra committed Oct 31, 2024
1 parent 228d1fd commit 89cc218
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/app/src/components/Editor/YamlEditor/YamlEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ export function YamlEditor(props: YamlEditorProps) {
onValueChange: props.setCode,
});

onMount(() => {
props.onMount(editorView());
});

createExtension(() => [
fleetDark,
yaml(),
Expand Down Expand Up @@ -82,6 +78,10 @@ export function YamlEditor(props: YamlEditorProps) {
];
}, editorView);

createEffect(() => {
props.onMount(editorView());
});

createEffect(() => {
const code = props.code;
const view = editorView();
Expand Down

0 comments on commit 89cc218

Please sign in to comment.