mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Wrap view.dispatch in setTimeout (#21365)
GitOrigin-RevId: 61c19e10f9529b4d7913f01c57281931533153d2
This commit is contained in:
parent
1407c9062d
commit
516a7abc2a
1 changed files with 3 additions and 1 deletions
|
@ -232,7 +232,9 @@ function useCodeMirrorScope(view: EditorView) {
|
|||
spellCheckLanguage,
|
||||
hunspellManager,
|
||||
}
|
||||
view.dispatch(setSpellCheckLanguage(spellingRef.current))
|
||||
window.setTimeout(() => {
|
||||
view.dispatch(setSpellCheckLanguage(spellingRef.current))
|
||||
})
|
||||
}, [view, spellCheckLanguage, hunspellManager])
|
||||
|
||||
const projectFeaturesRef = useRef(projectFeatures)
|
||||
|
|
Loading…
Reference in a new issue