From 16162c01eddcb812b7a2e130a8465e8eb6fdcbc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=96=87=E5=BA=AD?= <31032745+wangwenting-dev@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:01:23 +0800 Subject: [PATCH] fix: download from url triggered twice sometimes (#5319) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决Chrome、Safari通过路径一次下载两个文件的BUG --- packages/@core/base/shared/src/utils/download.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/@core/base/shared/src/utils/download.ts b/packages/@core/base/shared/src/utils/download.ts index 3e708d3c5..6f38ee5b2 100644 --- a/packages/@core/base/shared/src/utils/download.ts +++ b/packages/@core/base/shared/src/utils/download.ts @@ -31,6 +31,7 @@ export async function downloadFileFromUrl({ if (isChrome || isSafari) { triggerDownload(source, resolveFileName(source, fileName)); + return; } if (!source.includes('?')) { source += '?download';