From 3c6815216fee50acd871f5e9aa70ba210930f94d Mon Sep 17 00:00:00 2001 From: Silberengel Date: Wed, 18 Mar 2026 17:36:33 +0100 Subject: [PATCH] bug-fix --- src/components/PostEditor/PostTextarea/Mention/suggestion.ts | 3 ++- src/services/post-editor-cache.service.ts | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/PostEditor/PostTextarea/Mention/suggestion.ts b/src/components/PostEditor/PostTextarea/Mention/suggestion.ts index 4264b125..3a79a241 100644 --- a/src/components/PostEditor/PostTextarea/Mention/suggestion.ts +++ b/src/components/PostEditor/PostTextarea/Mention/suggestion.ts @@ -45,7 +45,7 @@ const suggestion = { }: { editor: Editor range: { from: number; to: number } - props: { id: string; label?: string; mode?: PickerSearchMode } + props: { id: string | null; label?: string | null; mode?: PickerSearchMode } }) => { if (props.id === NEVENT_NADDR_PICKER_ID) { postEditor.closeSuggestionPopup() @@ -56,6 +56,7 @@ const suggestion = { ) return } + if (props.id == null) return const to = extendMentionRangeToEndOfWord(editor, range) const nodeAfter = editor.view.state.selection.$to.nodeAfter const overrideSpace = nodeAfter?.text?.startsWith(' ') diff --git a/src/services/post-editor-cache.service.ts b/src/services/post-editor-cache.service.ts index 8c07e12b..f57be1f2 100644 --- a/src/services/post-editor-cache.service.ts +++ b/src/services/post-editor-cache.service.ts @@ -21,7 +21,6 @@ class PostEditorCacheService { private postContentCache: Map = new Map() private postSettingsCache: Map = new Map() - private static THREAD_DRAFT_KEY = 'create-thread' private threadDraftCache: TThreadDraft | null = null constructor() {