From 59b39fda2bf536a13fdb59c64a13fe79136b617f Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sun, 30 Sep 2018 16:27:06 -0400 Subject: [PATCH] Removes forEach call --- src/git/parsers/blameParser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/git/parsers/blameParser.ts b/src/git/parsers/blameParser.ts index 30822c9..cf63a53 100644 --- a/src/git/parsers/blameParser.ts +++ b/src/git/parsers/blameParser.ts @@ -137,14 +137,14 @@ export class GitBlameParser { } } - commits.forEach(c => { + for (const [, c] of commits) { if (c.author === undefined) return; const author = authors.get(c.author); if (author === undefined) return; author.lineCount += c.lines.length; - }); + } const sortedAuthors = new Map([...authors.entries()].sort((a, b) => b[1].lineCount - a[1].lineCount));