Skip to content

Commit

Permalink
Make init more async
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Oct 27, 2023
1 parent fd8bfdf commit e1b00b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion app/assets/javascripts/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ export async function configureEditor(parent: Element, programmingLanguage: stri
const languageSupport = await loadProgrammingLanguage(programmingLanguage);
const languageExtensions = [];
if (languageSupport !== undefined) {
console.log(languageSupport);
languageExtensions.push(languageSupport);
}
return new EditorView({
Expand Down
3 changes: 2 additions & 1 deletion app/assets/javascripts/exercise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,11 @@ async function initExerciseShow(exerciseId: number, programmingLanguage: string,

async function init(): Promise<void> {
if (editorShown) {
await initEditor();
const editorReady = initEditor();
initDeadlineTimeout();
enableSubmissionTableLinks();
swapActionButtons();
await editorReady;
initRestoreBoilerplateButton(boilerplate);
}

Expand Down

0 comments on commit e1b00b0

Please sign in to comment.