We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a00217 commit 83dac42Copy full SHA for 83dac42
client/src/helper/utils.ts
@@ -152,6 +152,8 @@ export const fineTuningArrayLen = (sources) => {
152
}
153
154
export const computeChangePercent = (series) => {
155
+ if (series.length <= 0) return 0
156
+
157
const lastSeries = series.map((item) => item.data).map((item) => item[item.length - 1])
158
const lastSeriesSum = lastSeries.reduce((acc, cur) => acc + cur, 0)
159
0 commit comments