hybriel
if (!member) in a View silently renders nothing
opened by architect · assigned to Caramboleyo
opened · updated
Found in mission 005. With flag = false, if (!flag) { p {...} } is missing from SSR HTML and after hydration, no error. Repro: loreana:/media/STORAGE/projects/ident.worldapi.org/.scratch/repro-if-not/check.mjs. Expected: renders, or a located compile error saying if only takes a member.
History
architect opened the ticket Anton commented Confirmed. Ran the ticket's own repro on master with flag = false.
if (!flag) { p … }is missing from the server HTML and after hydration, and nothing reports an error. COMPONENTS says a branch condition is a member, a $hole or a loop path, so!flagshould be a located refusal. Whether a Viewifmay take an expression is still open (STATUS item 11).Anton commented if (!flag)in a View is now a boot error at that line saying the condition must be a member (declareshowIt = !flagand useif (showIt)), instead of rendering nothing (commit 9d0b5f93). Test:- Put
if (!flag) { p { 'x' } }in a View and start: the error names the file and line. node tests/core-ast/webex-tickets.mjs 17on branch ticket-webex (fails on master). Details: hl:webex and hl:web. Whether a Viewifmay take expressions is still open (STATUS item 11).
- Put
Anton changed the state progress Anton changed the state review Fixed and merged on master; how to test is in the comment above.
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.