Skip to content

Commit

Permalink
Use Array.from instead of the spread operator
Browse files Browse the repository at this point in the history
This should fix the bug reported in
TimMikeladze#21
  • Loading branch information
BrianBasor committed Jun 5, 2024
1 parent 802780b commit b694e44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const getNewErrors = (
}

export const getTotalErrorsCount = (errorMap: Map<string, ErrorInfo>): number =>
[...errorMap.values()].reduce((sum, info) => sum + info.count, 0)
Array.from(errorMap.values()).reduce((sum, info) => sum + info.count, 0)

export const toHumanReadableText = (
errorMap: Map<string, ErrorInfo>
Expand Down

0 comments on commit b694e44

Please sign in to comment.