From 021cdf8034fa1e723ccd4b8079f737c36038a360 Mon Sep 17 00:00:00 2001 From: dhakarRaghu <149622456+dhakarRaghu@users.noreply.github.com> Date: Mon, 9 Dec 2024 21:18:52 +0530 Subject: [PATCH] Desktop: Fixes #11261 : Ensure spell-check toggle works on macOS (#11388) --- .../services/spellChecker/SpellCheckerServiceDriverNative.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/app-desktop/services/spellChecker/SpellCheckerServiceDriverNative.ts b/packages/app-desktop/services/spellChecker/SpellCheckerServiceDriverNative.ts index e9cdae758..3023ceb48 100644 --- a/packages/app-desktop/services/spellChecker/SpellCheckerServiceDriverNative.ts +++ b/packages/app-desktop/services/spellChecker/SpellCheckerServiceDriverNative.ts @@ -52,12 +52,9 @@ export default class SpellCheckerServiceDriverNative extends SpellCheckerService // If we pass an empty array, it disables spell checking // https://github.com/electron/electron/issues/25228 - if (effectiveLanguages.length === 0) { - this.session().setSpellCheckerLanguages([]); - return; - } this.session().setSpellCheckerLanguages(effectiveLanguages); + this.session().setSpellCheckerEnabled(effectiveLanguages.length > 0); logger.info(`Set effective languages to "${effectiveLanguages}"`); }