Skip to content

Commit

Permalink
fix(website): update bar tooltip to prevent crash (#1627)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyze committed Jun 24, 2021
1 parent fe388ff commit 0dd20f1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion website/src/data/components/bar/mapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ const TooltipWrapper = styled.div`
display: grid;
grid-template-columns: 1fr 1fr;
grid-column-gap: 12px;
background: #333;
padding: 12px 16px;
font-size: 12px;
border-radius: 2px;
`
const TooltipKey = styled.span`
font-weight: 600;
Expand Down Expand Up @@ -44,7 +48,7 @@ export default settingsMapper(
axisBottom: mapAxis('bottom'),
axisLeft: mapAxis('left'),
tooltip: (value, values) => {
if (!values['custom tooltip example']) return null
if (!values['custom tooltip example']) return undefined

return CustomTooltip
},
Expand Down

0 comments on commit 0dd20f1

Please sign in to comment.