fix(web): prevent click event from being stored as document title
The sidebar "+ Document" button was passing the click event to onNewDocument, which stored a SyntheticEvent object as the title, causing React error #31 when rendering. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -432,7 +432,7 @@ export function Sidebar({
|
||||
|
||||
{/* Footer */}
|
||||
<div className="sidebar-footer">
|
||||
<button className="sidebar-footer-btn" onClick={onNewDocument}>+ Document</button>
|
||||
<button className="sidebar-footer-btn" onClick={() => onNewDocument()}>+ Document</button>
|
||||
<button className="sidebar-footer-btn" onClick={onNewFolder}>+ Folder</button>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user