T21: Fix RefObject type error in RibbonBar.tsx (guard yjsDoc with && check)
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user