@@ -1053,7 +1053,7 @@ class MonacoEditor extends React.Component<Props, State> implements Editor {
10531053 updateLintWarnings = async ( markers : Array < Object > ) => {
10541054 const currentModule = this . currentModule ;
10551055
1056- const mode = await getMode ( currentModule . title ) ;
1056+ const mode = await getMode ( currentModule . title , this . monaco ) ;
10571057 if ( mode === 'javascript' || mode === 'vue' ) {
10581058 this . monaco . editor . setModelMarkers (
10591059 this . editor . getModel ( ) ,
@@ -1140,7 +1140,7 @@ class MonacoEditor extends React.Component<Props, State> implements Editor {
11401140 }
11411141
11421142 syntaxHighlight = async ( code : string , title : string , version : string ) => {
1143- const mode = await getMode ( title ) ;
1143+ const mode = await getMode ( title , this . monaco ) ;
11441144 if ( mode === 'typescript' || mode === 'javascript' ) {
11451145 if ( this . syntaxWorker ) {
11461146 this . syntaxWorker . postMessage ( {
@@ -1153,7 +1153,7 @@ class MonacoEditor extends React.Component<Props, State> implements Editor {
11531153 } ;
11541154
11551155 lint = async ( code : string , title : string , version : number ) => {
1156- const mode = await getMode ( title ) ;
1156+ const mode = await getMode ( title , this . monaco ) ;
11571157 if ( this . settings . lintEnabled ) {
11581158 if ( mode === 'javascript' || mode === 'vue' ) {
11591159 if ( this . lintWorker ) {
@@ -1337,7 +1337,7 @@ class MonacoEditor extends React.Component<Props, State> implements Editor {
13371337 // Related issue: https://github.com/Microsoft/monaco-editor/issues/461
13381338 const lib = this . addLib ( module . code || '' , path ) ;
13391339
1340- const mode = await getMode ( module . title ) ;
1340+ const mode = await getMode ( module . title , this . monaco ) ;
13411341
13421342 const model = this . monaco . editor . createModel (
13431343 module . code || '' ,
0 commit comments