mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Don't send spellCheckLanguage request if the old value is the same as the new one
GitOrigin-RevId: 4ef34be7563ff707b6abd44dc8034293c88d2f72
This commit is contained in:
parent
ae5a08e680
commit
777beaadc3
1 changed files with 4 additions and 1 deletions
|
@ -11,7 +11,10 @@ export default function useSetSpellCheckLanguage() {
|
|||
|
||||
const setSpellCheckLanguage = useCallback(
|
||||
(spellCheckLanguage: string) => {
|
||||
if (spellCheckLanguageScope) {
|
||||
if (
|
||||
spellCheckLanguageScope &&
|
||||
spellCheckLanguage !== spellCheckLanguageScope
|
||||
) {
|
||||
sendMB('setting-changed', {
|
||||
changedSetting: 'spellCheckLanguage',
|
||||
changedSettingVal: spellCheckLanguage,
|
||||
|
|
Loading…
Reference in a new issue