fix: use correct state when doc changed externally (#1646)

This commit is contained in:
dkrym
2021-08-09 23:20:46 +10:00
committed by GitHub
parent b426e8c17a
commit 60606f99a1

View File

@@ -83,7 +83,7 @@ export function Suggestion({
return return
} }
const state = handleExit ? prev : next const state = handleExit && !handleStart ? prev : next
const decorationNode = document.querySelector(`[data-decoration-id="${state.decorationId}"]`) const decorationNode = document.querySelector(`[data-decoration-id="${state.decorationId}"]`)
const props: SuggestionProps = { const props: SuggestionProps = {
editor, editor,