From e6a06ebf444509c5ddfd05fb8f6cbe6ae9b95c6e Mon Sep 17 00:00:00 2001 From: Vendicated Date: Fri, 6 Feb 2026 04:20:03 +0100 Subject: [PATCH] fix spellcheck --- src/renderer/patches/spellCheck.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/renderer/patches/spellCheck.tsx b/src/renderer/patches/spellCheck.tsx index 0601953..4f4417f 100644 --- a/src/renderer/patches/spellCheck.tsx +++ b/src/renderer/patches/spellCheck.tsx @@ -17,12 +17,11 @@ let corrections: string[]; addPatch({ patches: [ { - find: ".enableSpellCheck)", + find: ".enableSpellCheck", replacement: { - // if (isDesktop) { DiscordNative.onSpellcheck(openMenu(props)) } else { e.preventDefault(); openMenu(props) } - match: /else (\i)\.preventDefault\(\),(\i\(\i\))(?<=:(\i)\.enableSpellCheck\).+?)/, - // ... else { $self.onSlateContext(() => openMenu(props)) } - replace: "else {$self.onSlateContext($1, $3?.enableSpellCheck, () => $2)}" + // if (settings?.enableSpellCheck && isDesktop) { DiscordNative.onSpellcheck(openMenu(props)) } else { e.preventDefault(); openMenu(props) } + match: /else (\i)\.preventDefault\(\),(\i\(\i\))(?<=(\i)\??\.enableSpellCheck.+?)/, + replace: "else $self.onSlateContext($1, $3?.enableSpellCheck, () => $2)" } } ],