mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user