From 60606f99a1df3c694cc2faa0522c772ef419e9fe Mon Sep 17 00:00:00 2001 From: dkrym Date: Mon, 9 Aug 2021 23:20:46 +1000 Subject: [PATCH] fix: use correct state when doc changed externally (#1646) --- packages/suggestion/src/suggestion.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/suggestion/src/suggestion.ts b/packages/suggestion/src/suggestion.ts index a3f071a5e..cef89db79 100644 --- a/packages/suggestion/src/suggestion.ts +++ b/packages/suggestion/src/suggestion.ts @@ -83,7 +83,7 @@ export function Suggestion({ return } - const state = handleExit ? prev : next + const state = handleExit && !handleStart ? prev : next const decorationNode = document.querySelector(`[data-decoration-id="${state.decorationId}"]`) const props: SuggestionProps = { editor,