1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Fixes #11261 : Ensure spell-check toggle works on macOS (#11388)

This commit is contained in:
dhakarRaghu 2024-12-09 21:18:52 +05:30 committed by GitHub
parent f5b5cf74c5
commit 021cdf8034
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,12 +52,9 @@ export default class SpellCheckerServiceDriverNative extends SpellCheckerService
// If we pass an empty array, it disables spell checking // If we pass an empty array, it disables spell checking
// https://github.com/electron/electron/issues/25228 // https://github.com/electron/electron/issues/25228
if (effectiveLanguages.length === 0) {
this.session().setSpellCheckerLanguages([]);
return;
}
this.session().setSpellCheckerLanguages(effectiveLanguages); this.session().setSpellCheckerLanguages(effectiveLanguages);
this.session().setSpellCheckerEnabled(effectiveLanguages.length > 0);
logger.info(`Set effective languages to "${effectiveLanguages}"`); logger.info(`Set effective languages to "${effectiveLanguages}"`);
} }