mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-10 04:14:36 +00:00
perform null check on the old value instead of the new one since to follow the non-react version behaviour
GitOrigin-RevId: 33ef74e1b1da41db8a86fc79ae04fbe49ed194df
This commit is contained in:
parent
94ab78b427
commit
82cd2d2a77
1 changed files with 2 additions and 1 deletions
|
@ -12,7 +12,8 @@ export default function useSetSpellCheckLanguage() {
|
|||
return useCallback(
|
||||
(newSpellCheckLanguage: ProjectSettings['spellCheckLanguage']) => {
|
||||
const allowUpdate =
|
||||
newSpellCheckLanguage && newSpellCheckLanguage !== spellCheckLanguage
|
||||
spellCheckLanguage != null &&
|
||||
newSpellCheckLanguage !== spellCheckLanguage
|
||||
|
||||
if (allowUpdate) {
|
||||
setSpellCheckLanguage(newSpellCheckLanguage)
|
||||
|
|
Loading…
Reference in a new issue