You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scope through a property whose name ends in "then" or "else" binds the control to the wrong data path #2664
toDataPathSegments strips then/ and else/ (and anyOf/N/ etc.) anywhere in the scope string, not only as whole path segments. So a scope that goes through a property named then, else, something_else, strengthen, ... is turned into a wrong data path:
In a form the control shows nothing and typing writes to a new top-level key. With the React vanilla renderers, data { something_else: { name: "Bob" } } shows an empty input, and typing "Alice" produces
Rules whose condition scope goes through such a property read the wrong value too.
Expected behavior
toDataPath("#/properties/something_else/properties/name") is "something_else.name", the input shows "Bob", and typing gives {"something_else":{"name":"Alice"}}. Only whole then/else segments (as in #/then/properties/x) should be dropped.
The regexes in packages/core/src/util/path.ts are /(anyOf|allOf|oneOf)\/[\d]+\//g and /(then|else)\//g. They match inside a segment, and they also match a segment that is a property name, so the scope would need to be split into segments first and then/else/anyOf/N dropped only where a keyword is expected (not right after properties).
Hi @trackoor , thanks for the report. That definitely sounds like a bug to me!
Especially the case where segments only containing these keywords (e.g. your something_else example) should be fixed.
Activity
lucas-koehler commentedon Nov 18, 2026
Hi @trackoor , thanks for the report. That definitely sounds like a bug to me!
Especially the case where segments only containing these keywords (e.g. your
something_elseexample) should be fixed.Would you like to contribute a fix?
trackoor commentedon Nov 21, 2026
Sure, opened #2675 for it.