mirror of
https://github.com/harness/drone.git
synced 2025-05-19 02:20:03 +08:00
fix: [code-682]: update useDownloadRawfile hook (#328)
This commit is contained in:
parent
f5eae579c6
commit
8659a44226
@ -26,9 +26,12 @@ export function useDownloadRawFile() {
|
||||
|
||||
document.body.appendChild(anchor)
|
||||
anchor.click()
|
||||
document.body.removeChild(anchor)
|
||||
|
||||
URL.revokeObjectURL(imageURL)
|
||||
// Cleaning up requires a timeout to work under Firefox
|
||||
setTimeout(() => {
|
||||
document.body.removeChild(anchor)
|
||||
URL.revokeObjectURL(imageURL)
|
||||
}, 100)
|
||||
return { status: true }
|
||||
}
|
||||
}, [name, response])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user