Skip to content

Commit fac5fb6

Browse files
committed
fix: add fallback tooltip for theme.json data with no name like blocksy
1 parent 9bd6a27 commit fac5fb6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/advanced-range-control/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const AdvancedRangeControl = props => {
175175
]
176176
}, [] )
177177
propsToPass.renderTooltipContent = value => {
178-
return props.marks[ value ]?.name || ''
178+
return props.marks[ value ]?.name || props.marks[ value ]?.slug || ''
179179
}
180180

181181
// Other necessary props for steps.

src/components/four-range-control/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ const FourRangeControl = memo( props => {
339339
]
340340
}, [] )
341341
newProps.renderTooltipContent = value => {
342-
return props.marks[ value ]?.name || ''
342+
return props.marks[ value ]?.name || props.marks[ value ]?.slug || ''
343343
}
344344

345345
// Other necessary props for steps.

0 commit comments

Comments
 (0)