Browse Source

bug-fix

imwald
Silberengel 1 month ago
parent
commit
3c6815216f
  1. 3
      src/components/PostEditor/PostTextarea/Mention/suggestion.ts
  2. 1
      src/services/post-editor-cache.service.ts

3
src/components/PostEditor/PostTextarea/Mention/suggestion.ts

@ -45,7 +45,7 @@ const suggestion = { @@ -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 = { @@ -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(' ')

1
src/services/post-editor-cache.service.ts

@ -21,7 +21,6 @@ class PostEditorCacheService { @@ -21,7 +21,6 @@ class PostEditorCacheService {
private postContentCache: Map<string, Content> = new Map()
private postSettingsCache: Map<string, TPostSettings> = new Map()
private static THREAD_DRAFT_KEY = 'create-thread'
private threadDraftCache: TThreadDraft | null = null
constructor() {

Loading…
Cancel
Save