From 7a014b137fb2aa318b079d45eaffdeca5702f009 Mon Sep 17 00:00:00 2001 From: Hari Acharya Date: Mon, 19 Jun 2023 08:24:03 +0545 Subject: [PATCH] moved validation to top of function --- demos/src/Examples/Community/React/suggestion.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/demos/src/Examples/Community/React/suggestion.js b/demos/src/Examples/Community/React/suggestion.js index f41084e5b3d..06c2a856d7b 100644 --- a/demos/src/Examples/Community/React/suggestion.js +++ b/demos/src/Examples/Community/React/suggestion.js @@ -16,15 +16,16 @@ export default { return { onStart: props => { + if (!props.clientRect) { + return + } + reactRenderer = new ReactRenderer(MentionList, { props, editor: props.editor, }) - if (!props.clientRect) { - return - } - + popup = tippy('body', { getReferenceClientRect: props.clientRect, appendTo: () => document.body,