ソースを参照

cancel sooner

Former-commit-id: cd2e10bf9ff18c66a02aa139582995399582e3e3
Gildas 6 年 前
コミット
13ebee9fc4
1 ファイル変更5 行追加3 行削除
  1. 5 3
      extension/lib/gdrive/gdrive.js

+ 5 - 3
extension/lib/gdrive/gdrive.js

@@ -180,10 +180,12 @@ this.GDrive = this.GDrive || (() => {
 			}));
 			const location = httpResponse.headers.get("Location");
 			this.url = location;
-			if (this.onProgress && !this.cancelled) {
-				this.onProgress(0, this.file.size);
+			if (!this.cancelled) {
+				if (this.onProgress) {
+					this.onProgress(0, this.file.size);
+				}
+				return sendFile(this);
 			}
-			return sendFile(this);
 		}
 	}