diff --git a/src/lib/components/editor/editor.svelte b/src/lib/components/editor/editor.svelte index a5b2956a4..7ae0c8e6d 100644 --- a/src/lib/components/editor/editor.svelte +++ b/src/lib/components/editor/editor.svelte @@ -14,7 +14,7 @@ let editorElement: HTMLDivElement; export function openFile(code: string, path: string) { - if (!code || path.endsWith('/')) return; + if (path.endsWith('/')) return; const uri = monaco.Uri.parse(path); const model = monaco.editor.getModel(uri) ?? monaco.editor.createModel(code, null, uri); model.setValue(code); @@ -68,7 +68,7 @@ -