Fix "update in progress" error when removing highlight ranges (#21024)

GitOrigin-RevId: 025e69f10b6010fe978ac57838ae17c113358633
This commit is contained in:
Domagoj Kriskovic
2024-10-11 13:07:18 +02:00
committed by Copybot
parent 52e49c4f6b
commit 993e34f421

View File

@@ -70,7 +70,9 @@ export const ReviewPanelEntry: FC<{
useEffect(() => {
return () => {
if (hoverRanges) {
view.dispatch(clearHighlightRanges(op))
setTimeout(() => {
view.dispatch(clearHighlightRanges(op))
})
}
}
}, []) // eslint-disable-line react-hooks/exhaustive-deps