Skip to content
This repository was archived by the owner on Nov 25, 2021. It is now read-only.

Commit 2f97ddf

Browse files
author
sluger
committed
check for null and undefined instead of boolean
1 parent 0689f61 commit 2f97ddf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/controllers/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const horizontalDefaults = {
1919

2020
export function toFixed(value) {
2121
const decimals = this._chart.config.options.tooltipDecimals; // inject number of decimals from config
22-
if (!decimals || typeof decimals !== 'number' || decimals < 0) {
22+
if (decimals == null || typeof decimals !== 'number' || decimals < 0) {
2323
return value;
2424
}
2525
return Number.parseFloat(value).toFixed(decimals);

0 commit comments

Comments
 (0)