diff --git a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js index 1c537f9b4e77b..d04983dc2f756 100644 --- a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js +++ b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js @@ -211,7 +211,7 @@ function ComposerWithSuggestions({ suggestionsRef.current.resetSuggestions(); } - const remainder = ComposerUtils.getCommonSuffixLength(commentRef.current, newComment); + const remainder = ComposerUtils.getCommonSuffixLength(commentValue, newComment); setSelection({ start: newComment.length - remainder, end: newComment.length - remainder,