Skip to content

Commit

Permalink
add fallback if formatter is not a function or undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas742 committed Jul 22, 2020
1 parent 8b2c1d0 commit 3dea3fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/charts/src/hooks/useLabelFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const useLabelFormatter = (primaryDimension) => {
if (primaryDimension && typeof primaryDimension?.formatter === 'function') {
return primaryDimension.formatter(name);
}
return name;
},
[primaryDimension]
);
Expand Down

0 comments on commit 3dea3fe

Please sign in to comment.