Skip to content

Commit

Permalink
Add check for typeof number
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Jan 27, 2020
1 parent 12c8f06 commit 8658b10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/plugin.tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ defaults._set('tooltips', {
}
const value = tooltipItem.value;
if (!helpers.isNullOrUndef(value)) {
label += isNaN(value) ? value : new Intl.NumberFormat().format(value);
label += typeof value !== 'number' || isNaN(value) ? value : new Intl.NumberFormat().format(value);
}
return label;
},
Expand Down

0 comments on commit 8658b10

Please sign in to comment.