From aea2653b19acc75312978d42b6f726713deca91e Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 25 Sep 2023 15:18:46 -0500 Subject: [PATCH] AutosuggestPlugin: remove extraneous `?` --- src/features/compose/editor/plugins/autosuggest-plugin.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/compose/editor/plugins/autosuggest-plugin.tsx b/src/features/compose/editor/plugins/autosuggest-plugin.tsx index 51fcc47a7..f13fcaf55 100644 --- a/src/features/compose/editor/plugins/autosuggest-plugin.tsx +++ b/src/features/compose/editor/plugins/autosuggest-plugin.tsx @@ -325,7 +325,7 @@ const AutosuggestPlugin = ({ const acct = selectAccount(getState(), suggestion)!.acct; const result = (node as TextNode).splitText(offset, offset + matchingString.length); const textNode = result[1] ?? result[0]; - const mentionNode = textNode?.replace($createMentionNode(`@${acct}`)); + const mentionNode = textNode.replace($createMentionNode(`@${acct}`)); mentionNode.insertAfter(new TextNode(' ')); mentionNode.selectNext(); }