Skip to content

fix(html): a condition on a list or an object no longer fails the who… - #1076

Merged
ionutpasca merged 1 commit into
developmentfrom
hotfix/html-export-collection-conditions
Oct 5, 2026
Merged

ionutpasca merged 1 commit into
developmentfrom
hotfix/html-export-collection-conditions

Conversation

@vladgrecu

Copy link
Copy Markdown
Member

…le HTML export

0.43.71 resolves a condition on a state against the value it starts with, so a download shows what a visitor sees on first load. A list or an object cannot be written into the comparison that check builds, and the error was thrown outside its guard: one "cart is not empty" in a project made the HTML export of the whole project fail ("Conditional node received an operand of type object"). 0.43.70 rendered nothing for a state condition and exported.

  • The collection operations (isEmpty, isNotEmpty, lengthEquals, lengthGreaterThan, lengthLessThan, contains, notContains, hasKey, notHasKey) are answered on the value itself, with the meaning node-to-html and node-to-jsx give them. "Is not empty" was also read as "is not" by the unary fallback, for texts and props too.
  • A condition the check cannot answer (a list compared with ===, an operand that is another value of the page) renders nothing, as before 0.43.71, and the export goes on.

Tests: two in project-generator-html/tests/conditionals; both fail on
0.43.71 with the error above. Whole suite: 526 suites, 6024 tests.

…le HTML export

0.43.71 resolves a condition on a state against the value it starts with, so a
download shows what a visitor sees on first load. A list or an object cannot be
written into the comparison that check builds, and the error was thrown outside
its guard: one "cart is not empty" in a project made the HTML export of the
whole project fail ("Conditional node received an operand of type object").
0.43.70 rendered nothing for a state condition and exported.

- The collection operations (isEmpty, isNotEmpty, lengthEquals,
  lengthGreaterThan, lengthLessThan, contains, notContains, hasKey, notHasKey)
  are answered on the value itself, with the meaning node-to-html and
  node-to-jsx give them. "Is not empty" was also read as "is not" by the unary
  fallback, for texts and props too.
- A condition the check cannot answer (a list compared with ===, an operand
  that is another value of the page) renders nothing, as before 0.43.71, and
  the export goes on.

Tests: two in project-generator-html/__tests__/conditionals; both fail on
0.43.71 with the error above. Whole suite: 526 suites, 6024 tests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vladgrecu
vladgrecu requested a review from ionutpasca October 5, 2026 12:01
@ionutpasca
ionutpasca merged commit edf9dcb into development Oct 5, 2026
1 check passed
@ionutpasca
ionutpasca deleted the hotfix/html-export-collection-conditions branch October 5, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants