Resolve PR #2585 Change Requests - #2609
Conversation
Added heading "Migration to JSON Forms 3.9" and moved "Data update paths treat all segments literally" from "Mifration to JSON Forms 3.8" to "Migration to JSON FOrms 3.9". This resolves the change request comment for `MIGRATION.md` file in PR eclipsesource#2585.
Added strict equality checks (`!== null && !== undefined`) inside `ownPropertyValue`. This resolves comment in PR eclipsesource#2585 regarding use of loose inequality.
|
Hi @darius-lesch, do you need JSON Forms 3.9 urgently shipped for your use cases? Would a pre-release of the current state be sufficient? |
Hi @sdirix , no, there is no immediate urgency for my use cases. A pre-release of the current state is more than sufficient. |
lucas-koehler
left a comment
There was a problem hiding this comment.
Hi @darius-lesch , thanks for the fixes ❤️
There is a small lint error due to expected formatting in the changed code line.
Hi @lucas-koehler , linting issue has been resolved now. |
lucas-koehler
left a comment
There was a problem hiding this comment.
LGTM now, thanks for the update!
|
@darius-lesch a pre-release |
The PR resolves two comments in #2585:
1.
packages/core/src/util/setData.tsThe use of the loose
!= nullwas originally intentional, as it is a standard JavaScript shorthand to check for bothnullandundefinedsimultaneously. We can't use!datain this context because it would be unsafe; it would incorrectly reject valid falsy data values that we want to keep, such as0,false, or an empty string"".However, I completely agree that loose inequality can look like a typo or cause confusion at first glance. To make the intent strictly clear and avoid any "weirdness", I've updated the logic to use the explicit multiple cases as you suggested:
data !== null && data !== undefined.2.
MIGRATION.mdI have also moved the data update path documentation into a new
## Migrating to JSON Forms 3.9section inMIGRATION.md.