Skip to content

Commit

Permalink
BoxControl: Fix critical error when null value is passed (#65287)
Browse files Browse the repository at this point in the history
* BoxControl: Fix critical error when null value is passed

* Add Changelog entry

* Update packages/components/src/box-control/utils.ts

Co-authored-by: Marin Atanasov <[email protected]>

---------

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: tyxla <[email protected]>
  • Loading branch information
3 people authored Sep 12, 2024
1 parent fb4ba26 commit 6d32f4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- `Tabs`: improved performance of the indicator animation ([#64926](https://github.com/WordPress/gutenberg/pull/64926)).
- `Composite`: Remove from private APIs ([#63569](https://github.com/WordPress/gutenberg/pull/63569)).
- use local copy of `use-lilius` instead of `npm` dependency ([#65097](https://github.com/WordPress/gutenberg/pull/65097)).
- `BoxControl`: Fix critical error when null value is passed ([#65287](https://github.com/WordPress/gutenberg/pull/65287)).

## 28.7.0 (2024-09-05)

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/box-control/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export function isValuesMixed(
*/
export function isValuesDefined( values?: BoxControlValue ) {
return (
values !== undefined &&
values &&
Object.values( values ).filter(
// Switching units when input is empty causes values only
// containing units. This gives false positive on mixed values
Expand Down

0 comments on commit 6d32f4f

Please sign in to comment.