AutosuggestPlugin: remove extraneous ?

This commit is contained in:
Alex Gleason 2023-09-25 15:18:46 -05:00
parent ab22422aa7
commit aea2653b19
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -325,7 +325,7 @@ const AutosuggestPlugin = ({
const acct = selectAccount(getState(), suggestion)!.acct; const acct = selectAccount(getState(), suggestion)!.acct;
const result = (node as TextNode).splitText(offset, offset + matchingString.length); const result = (node as TextNode).splitText(offset, offset + matchingString.length);
const textNode = result[1] ?? result[0]; const textNode = result[1] ?? result[0];
const mentionNode = textNode?.replace($createMentionNode(`@${acct}`)); const mentionNode = textNode.replace($createMentionNode(`@${acct}`));
mentionNode.insertAfter(new TextNode(' ')); mentionNode.insertAfter(new TextNode(' '));
mentionNode.selectNext(); mentionNode.selectNext();
} }