diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/Monaco.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/components/Monaco.ts b/src/components/Monaco.ts index e147159..f40db77 100644 --- a/src/components/Monaco.ts +++ b/src/components/Monaco.ts @@ -33,10 +33,12 @@ export async function launchMonacoEditor() { win.setCss = setCss; win.getCurrentCss = () => VencordNative.ipc.invoke(IpcEvents.GET_QUICK_CSS); - win.getTheme = () => find(m => m.ProtoClass?.typeName.endsWith("PreloadedUserSettings")) - .getCurrentValue().appearance.theme === 1 - ? "vs-dark" - : "vs-light"; + win.getTheme = () => + find(m => + m.ProtoClass?.typeName.endsWith("PreloadedUserSettings") + )?.getCurrentValue()?.appearance?.theme === 2 + ? "vs-light" + : "vs-dark"; win.document.write(monacoHtml); } |