Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
fix(common): ngStyle should ignore undefined values #34422
Prior to ivy, undefined values passed in an object to the ngStyle directive were ignored. Restore this behavior by ignoring keys that point to undefined values.
Please check if your PR fulfills the following requirements:
What kind of change does this PR introduce?
What is the current behavior?
Since ivy, objects with keys set to undefined passed to ngstyle will alter the computed styles.
Issue Number: 34310
What is the new behavior?
Restore original behavior of keys set to undefined being ignored.
Does this PR introduce a breaking change?
Note, when running (all) tests locally I had 8 failed tests on both tip of master, and this branch. I'm unsure if this is something I've done wrong, or just the state of master currently. I was however able to observe my new test failing without my changes, and passing with the changes applied.
It would be great if there could be a single "pre-flight" check script to run prior to pushing that would execute an equivalent of a full CI build locally, as the documentation for build/test/analyse feels quite fragmented at the moment.
My original approach was to filter out undefined keys at the
I've now adjusted my approach to skip over values that are undefined in the styling differ, and the tests that were failing now pass locally.
This issue has been automatically locked due to inactivity.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.