From 124ec28aebd04d1df2f147e653dfc1a4922313d6 Mon Sep 17 00:00:00 2001 From: ahmedGaber93 Date: Mon, 18 Sep 2023 22:32:03 +0200 Subject: [PATCH] fix issue 27156 --- .../home/report/ReportActionCompose/ComposerWithSuggestions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js index 0f6ec912382f..14930a0c3ab1 100644 --- a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js +++ b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js @@ -190,7 +190,7 @@ function ComposerWithSuggestions({ // Reset suggestions when an emoji is replaced and the selection is not changed. // More info issue #27156 - if (selection.end === newSelectionPosition){ + if (selection.end === newSelectionPosition && suggestionsRef.current){ suggestionsRef.current.resetSuggestions(); }