T21: Fix RefObject type error in RibbonBar.tsx (guard yjsDoc with && check)

This commit is contained in:
2026-06-22 23:23:10 +00:00
parent 5178e2a4fc
commit f6a18c366d
+2 -2
View File
@@ -162,8 +162,8 @@ const RibbonBar: React.FC<RibbonBarProps> = ({ onTabChange, yjsDoc }) => {
onChange={handleFileSelected}
/>
{showPrintPreview && (
<PrintPreview yjsDoc={yjsDoc ?? null} onClose={() => setShowPrintPreview(false)} />
{showPrintPreview && yjsDoc && (
<PrintPreview yjsDoc={yjsDoc} onClose={() => setShowPrintPreview(false)} />
)}
</div>
);