diff --git a/core/client.js b/core/client.js index 59ed4e6d..6ffc0ed3 100644 --- a/core/client.js +++ b/core/client.js @@ -435,8 +435,10 @@ async function edit() { document.getElementById('viewPane').style.display = is_edit_only() ? 'none' : 'flex'; try { - cm6 = await import('/codemirror/cm6.js'); - gEditor = cm6.TildeFriendsEditorView(document.getElementById("editor")); + if (!gEditor) { + cm6 = await import('/codemirror/cm6.js'); + gEditor = cm6.TildeFriendsEditorView(document.getElementById("editor")); + } gEditor.onDocChange = updateFiles; await load(); } catch (error) {