Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
justinehell committed Sep 8, 2023
1 parent 73d010d commit 6bdfb2a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/editor/MonacoEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@ import {
onMounted,
onUpdated,
onUnmounted,
nextTick,
ref,
} from 'vue';
import FileEvent from 'src/composables/events/FileEvent';
import GitEvent from 'src/composables/events/GitEvent';
import { getPlugins } from 'src/composables/PluginManager';
import Languages from 'assets/editor/languages';
const monaco = require('monaco-editor');
const props = defineProps({
projectName: {
type: String,
Expand All @@ -42,6 +39,7 @@ const props = defineProps({
});
const container = ref(null);
let monaco;
let editor;
let checkoutSubscription;
let addRemoteSubscription;
Expand Down Expand Up @@ -136,7 +134,8 @@ async function updateEditorContent() {
}
onBeforeMount(async () => {
await nextTick();
monaco = await import('monaco-editor');
if (!editor) {
await createEditor();
}
Expand All @@ -158,7 +157,6 @@ onMounted(() => {
});
onUpdated(async () => {
await nextTick();
await updateEditorLayout();
});
Expand Down

0 comments on commit 6bdfb2a

Please sign in to comment.