Apply convert to defaults and preserve explicit null writes#118
Merged
Conversation
e202c15 to
cb8cb73
Compare
6a9beff to
2d6e200
Compare
cb8cb73 to
605981c
Compare
2d6e200 to
65a893d
Compare
605981c to
22d7769
Compare
65a893d to
7cc97fd
Compare
22d7769 to
025f2b5
Compare
7cc97fd to
2b667b9
Compare
LeaVerou
approved these changes
May 15, 2026
2b667b9 to
bd68789
Compare
025f2b5 to
9895813
Compare
bd68789 to
2b667b9
Compare
9895813 to
025f2b5
Compare
2b667b9 to
80acf81
Compare
787e027 to
80e7485
Compare
80acf81 to
94c292e
Compare
80e7485 to
e72477a
Compare
94c292e to
522905e
Compare
e72477a to
6b12c36
Compare
522905e to
4610bd7
Compare
Member
Author
|
Note: this PR was auto-merged by GitHub as a side effect of a restack error — the head branch was force-pushed such that it became an ancestor of the base, which GitHub interprets as "already merged." The original commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related defaults bugs in
Prop.js:spec.convert, so{ default: 5, convert: v => v * 2 }read as5instead of10.get()now applies convert after parse, matching what a user write goes through.el.v = nullwas overridden by the default.get()no longer treatsnullthe same asundefined. To keepremoveAttributeresetting to default,set()collapses null-from-attribute toundefined.Unlocks the two pinned tests in the Defaults group (
Default passes through convert,null is preserved on a prop with a default); suite goes 93 → 95 passing.Test plan
npm test— Defaults group fully greenremoveAttribute collapses a reflected prop to its defaultstill passes