Skip to content

Commit 8ba3a59

Browse files
committed
Fix mode error for vue users
1 parent b5db02a commit 8ba3a59

File tree

1 file changed

+4
-1
lines changed
  • packages/app/src/app/components/CodeEditor/Monaco

1 file changed

+4
-1
lines changed

packages/app/src/app/components/CodeEditor/Monaco/mode.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ export default async (title: string, monaco) => {
1212
if (kind[1] === 'json') return 'json';
1313
if (kind[1] === 'html') return 'html';
1414
if (kind[1] === 'vue') {
15-
if (!monaco.languages.getLanguages().find(l => l.id === 'vue')) {
15+
if (
16+
monaco.languages.getLanguages &&
17+
!monaco.languages.getLanguages().find(l => l.id === 'vue')
18+
) {
1619
await requireAMDModule(['vs/language/vue/monaco.contribution']);
1720
}
1821
return 'vue';

0 commit comments

Comments
 (0)