Skip to content

fix: reject incomplete layout conditions - #360

Open
han4wluc wants to merge 1 commit into
mainfrom
fix/malformed-layout-when
Open

han4wluc wants to merge 1 commit into
mainfrom
fix/malformed-layout-when

Conversation

@han4wluc

Copy link
Copy Markdown
Contributor

An incomplete $when comparison in a layout, such as variables.flag ==, is interpreted instead of rejected, so the element appears when it should not.

Reproduce: a layout element with $when: "variables.flag ==" (regression test).

Fix: incomplete trailing operators raise a clear error; valid string and boolean conditions are unchanged. Behaviour change to review: a malformed condition now errors at render instead of silently showing the element.

Tests: focused tests, the full suite (2,164 tests), lint and the build pass.

This branch has not been deployed

No deployments
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.

1 participant