Skip to content

Commit

Permalink
Have UnitControl avoid sending undefined through onUnitChange
Browse files Browse the repository at this point in the history
  • Loading branch information
stokesman committed May 24, 2022
1 parent 96b0a2e commit 301c3d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/src/unit-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function UnforwardedUnitControl(
const changeProps = { event, data };

// The `onChange` callback already gets called, no need to call it explicitely.
onUnitChange?.( validParsedUnit, changeProps );
onUnitChange?.( validParsedUnit ?? '', changeProps );

setUnit( validParsedUnit );
}
Expand Down

0 comments on commit 301c3d4

Please sign in to comment.