mirror of
https://github.com/logseq/logseq.git
synced 2026-05-28 06:34:34 +00:00
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>