Fix display for average ending in zero for isocalendar plugin

This commit is contained in:
lowlighter
2020-11-03 21:33:36 +01:00
parent 9c149b51da
commit 21f2fa7bec
2 changed files with 2 additions and 2 deletions

View File

@@ -257,7 +257,7 @@ var E_Users_lecoq_Documents_GitHub_gitstats_node_modules_axios_index_default = /
streak.max = Math.max(streak.max, streak.current) streak.max = Math.max(streak.max, streak.current)
} }
} }
average = (values.reduce((a, b) => a + b, 0)/values.length).toFixed(2).replace(/.0+$/, "") average = (values.reduce((a, b) => a + b, 0)/values.length).toFixed(2).replace(/[.]0+$/, "")
//Compute SVG //Compute SVG
const size = 6 const size = 6
let i = 0, j = 0 let i = 0, j = 0

View File

@@ -39,7 +39,7 @@
streak.max = Math.max(streak.max, streak.current) streak.max = Math.max(streak.max, streak.current)
} }
} }
average = (values.reduce((a, b) => a + b, 0)/values.length).toFixed(2).replace(/.0+$/, "") average = (values.reduce((a, b) => a + b, 0)/values.length).toFixed(2).replace(/[.]0+$/, "")
//Compute SVG //Compute SVG
const size = 6 const size = 6
let i = 0, j = 0 let i = 0, j = 0