From 59d642434a0503790b26a48fdfeb6af02a5fa278 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sat, 6 Nov 2021 16:15:09 +0100 Subject: [PATCH] fixed "infinite" transfer speed display --- tabby-core/src/api/platform.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tabby-core/src/api/platform.ts b/tabby-core/src/api/platform.ts index d3898a2c..79362cb0 100644 --- a/tabby-core/src/api/platform.ts +++ b/tabby-core/src/api/platform.ts @@ -48,6 +48,9 @@ export abstract class FileTransfer { } protected increaseProgress (bytes: number): void { + if (!bytes) { + return + } this.completedBytes += bytes this.lastChunkSpeed = bytes * 1000 / (Date.now() - this.lastChunkStartTime) this.lastChunkStartTime = Date.now()