From b529695bde5e3b0dd27f37cb33a13c286aab5bff Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sun, 26 Jun 2016 19:52:14 +0800 Subject: [PATCH] fix bug --- src/scripts/services/aria2TaskService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/services/aria2TaskService.js b/src/scripts/services/aria2TaskService.js index fe59343..45bdd5e 100644 --- a/src/scripts/services/aria2TaskService.js +++ b/src/scripts/services/aria2TaskService.js @@ -64,7 +64,7 @@ task.remainLength = task.totalLength - task.completedLength; task.remainPercent = 100 - task.completePercent; task.uploadLength = (task.uploadLength ? parseInt(task.uploadLength) : 0); - task.shareRatio = (task.uploadLength / task.completedLength); + task.shareRatio = (task.completedLength > 0 ? task.uploadLength / task.completedLength : 0); task.uploadSpeed = parseInt(task.uploadSpeed); task.downloadSpeed = parseInt(task.downloadSpeed);