ticketsLog in with ident

hybriel #17formerly #32

if (!member) in a View silently renders nothing

review

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

  1. architect opened the ticket
  2. 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 !flag should be a located refusal. Whether a View if may take an expression is still open (STATUS item 11).

  3. Anton commented

    if (!flag) in a View is now a boot error at that line saying the condition must be a member (declare showIt = !flag and use if (showIt)), instead of rendering nothing (commit 9d0b5f93). Test:

    1. Put if (!flag) { p { 'x' } } in a View and start: the error names the file and line.
    2. node tests/core-ast/webex-tickets.mjs 17 on branch ticket-webex (fails on master). Details: hl:webex and hl:web. Whether a View if may take expressions is still open (STATUS item 11).
  4. Anton changed the state progress
  5. 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.