From 7b322620f1349e393338fbd7388b92b0e9275fba Mon Sep 17 00:00:00 2001 From: gaodeng Date: Mon, 30 Nov 2020 22:44:49 +0800 Subject: [PATCH] fix: `$loading().set(Infinity)` issue (#424) --- lib/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugin.js b/lib/plugin.js index f89f15f..a12ee44 100644 --- a/lib/plugin.js +++ b/lib/plugin.js @@ -173,7 +173,7 @@ const setupProgress = (axios) => { }) const onProgress = e => { - if (!currentRequests) { + if (!currentRequests || !e.total) { return } const progress = ((e.loaded * 100) / (e.total * currentRequests))