Repository navigation
Commit 0425a31
committed
fix(ui): mergeDefaultFont distinguishes cleared input from absent key
Using `??` to merge the patch into the current value collapsed two
distinct states: "this key was not in the patch" and "the user just
cleared this input". The latter passes `{ height: undefined }`, but
`undefined ?? current.height` falls through to the old value, so
clearing the height field had no effect on stored defaultFont. Replaces
`??` with an `in` check so an explicit `undefined` overrides current.1 parent bb7a613 commit 0425a31
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
484 | | - | |
485 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
486 | 489 | | |
487 | 490 | | |
488 | 491 | | |
0 commit comments