Skip to content

Commit

Permalink
Fallback to font size slug if name is undefined (#45041)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikachan authored and michalczaplinski committed Oct 18, 2022
1 parent 132a0fa commit 8a00f6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/src/font-size-picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function FontSizePicker(
}

// Calculate the `hint` for toggle group control.
let hint = selectedOption.name;
let hint = selectedOption?.name || selectedOption.slug;
if (
! fontSizesContainComplexValues &&
typeof selectedOption.size === 'string'
Expand Down

0 comments on commit 8a00f6a

Please sign in to comment.