mirror of
https://github.com/block/buzz.git
synced 2026-10-30 05:51:46 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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"}
|
||||
|
||||
@@ -720,7 +720,7 @@ export function MessageComposer({
|
||||
ref={composerScrollRef}
|
||||
onKeyDown={handleEditorKeyDown}
|
||||
>
|
||||
{richText.editor && <EditorContent editor={richText.editor} />}
|
||||
<EditorContent editor={richText.editor} />
|
||||
</div>
|
||||
|
||||
<MessageComposerToolbar
|
||||
|
||||
Reference in New Issue
Block a user