From 50a35eed88d2061a31a279e57ac14de07f054683 Mon Sep 17 00:00:00 2001 From: Eugeny Dementev Date: Thu, 26 Dec 2024 17:40:22 +0800 Subject: [PATCH] lint: code fixes --- src/detectors/MissingStreamDataDetector.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/detectors/MissingStreamDataDetector.ts b/src/detectors/MissingStreamDataDetector.ts index 9cd91de..e40ef09 100644 --- a/src/detectors/MissingStreamDataDetector.ts +++ b/src/detectors/MissingStreamDataDetector.ts @@ -121,7 +121,9 @@ export default class MissingStreamDataDetector extends BaseIssueDetector { return issues; } - private static mapStatsByTrackId(items: CommonParsedInboundStreamStats[][]): Map { + private static mapStatsByTrackId( + items: CommonParsedInboundStreamStats[][], + ): Map { const statsById = new Map(); items.forEach((inboundItems) => { inboundItems.forEach((inbountItem) => { @@ -129,13 +131,16 @@ export default class MissingStreamDataDetector extends BaseIssueDetector { accumulatedItems.push(inbountItem); statsById.set(inbountItem.track.trackIdentifier, accumulatedItems); }); - }) + }); return statsById; } - private static isAllBytesReceivedDidntChange(bytesReceived: number, inboundItems: CommonParsedInboundStreamStats[]): boolean { - for (const inboundItem of inboundItems) { + private static isAllBytesReceivedDidntChange( + bytesReceived: number, inboundItems: CommonParsedInboundStreamStats[], + ): boolean { + for (let i = 0; i < inboundItems.length; i++) { + const inboundItem = inboundItems[i]; if (inboundItem.bytesReceived !== bytesReceived) { return false; }