Skip to content

Commit 58d493f

Browse files
authored
Merge pull request #1986 from IgniteUI/boston-sample-vNext
Use reduce instead of flat operator
2 parents 3a72b25 + 9f96e0a commit 58d493f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/app-lob/src/app/grid/grid-boston-marathon/grid.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export class CustomSpeedSummary extends IgxNumberSummaryOperand {
250250
}
251251

252252
public operate(data?: any[]): IgxSummaryResult[] {
253-
data = (data as any).flat().map(rec => rec.Speed);
253+
data = data.reduce((acc, val) => acc.concat(val), []).map(rec => rec.Speed);
254254
const result = [];
255255
result.push(
256256
{

0 commit comments

Comments
 (0)