revert: remove EditorContent null guards

The null guards added conditional rendering that disrupted the mount
lifecycle — EditorContent was removed from the tree for one render
cycle, then re-added, racing with tiptap 3.23.6's scheduleDestroy
timeout. PureEditorContent already handles null editor gracefully
via optional chaining, so the guards are unnecessary.
This commit is contained in:
Will Pfleger
2026-05-26 19:54:58 -04:00
parent e0fcce7e54
commit f2b4cb755c
3 changed files with 3 additions and 3 deletions

View File

@@ -451,7 +451,7 @@ export function ForumComposer({
className="rich-text-composer max-h-32 overflow-y-auto"
onKeyDown={handleEditorKeyDown}
>
{richText.editor && <EditorContent editor={richText.editor} />}
<EditorContent editor={richText.editor} />
</div>
<MessageComposerToolbar

View File

@@ -31,7 +31,7 @@ export function ForumComposerCompactLayout({
className="rich-text-composer max-h-10 min-w-0 flex-1 overflow-y-auto"
onKeyDown={onEditorKeyDown}
>
{editor && <EditorContent editor={editor} />}
<EditorContent editor={editor} />
</div>
<Button
aria-label={isSending ? "Sending" : "Send message"}

View File

@@ -720,7 +720,7 @@ export function MessageComposer({
ref={composerScrollRef}
onKeyDown={handleEditorKeyDown}
>
{richText.editor && <EditorContent editor={richText.editor} />}
<EditorContent editor={richText.editor} />
</div>
<MessageComposerToolbar