We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 460a8ce commit 7fd8d2aCopy full SHA for 7fd8d2a
web_src/js/features/codeeditor.ts
@@ -41,8 +41,10 @@ const baseOptions: MonacoOpts = {
41
};
42
43
function getEditorconfig(input: HTMLInputElement): EditorConfig | null {
44
+ const json = input.getAttribute('data-editorconfig');
45
+ if (!json) return null;
46
try {
- return JSON.parse(input.getAttribute('data-editorconfig') ?? '');
47
+ return JSON.parse(json);
48
} catch {
49
return null;
50
}
0 commit comments