ソースを参照

fixed "infinite" transfer speed display

Eugene Pankov 4 年 前
コミット
59d642434a
1 ファイル変更3 行追加0 行削除
  1. 3 0
      tabby-core/src/api/platform.ts

+ 3 - 0
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()