Files
logseq/src
scheinriese cfedc6b2b8 fix(icon): use cond instead of case for delete-mode dispatch
The trash-button render switched the picker render path between
:hidden, :remove, and :two-option modes via (case delete-mode ...).
This caused an "Objects are not valid as a React child" runtime error
on icon-free pages — even though :hidden branch returned nil, the
parent dialog's render still threw.

Reproduced bisect: same logic with (cond (= delete-mode :hidden) ...)
renders cleanly. The case form alone — with keyword tests and a Radix
dropdown in one branch — leaked a keyword into React's child tree.

Swap to `cond` and add a code comment explaining the gotcha so a
future cleanup doesn't re-introduce the case form.

Verified live: Add icon on the icon-free "wowie" page now opens the
picker cleanly with no error boundary.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 16:55:23 +02:00
..
2026-05-04 12:31:54 +08:00