mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 14:38:46 +00:00
eslint: Fix unicorn/no-reduce.
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-reduce.md Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
24d4ab327c
commit
e68595a3fc
@@ -405,7 +405,10 @@ function compute_summary_chart_data(time_series_data, num_steps, labels_) {
|
||||
values[labels.length - 1] += sum;
|
||||
}
|
||||
}
|
||||
const total = values.reduce((a, b) => a + b, 0);
|
||||
let total = 0;
|
||||
for (const value of values) {
|
||||
total += value;
|
||||
}
|
||||
return {
|
||||
values,
|
||||
labels,
|
||||
|
||||
Reference in New Issue
Block a user