mirror of
https://github.com/harness/drone.git
synced 2025-05-19 10:29:55 +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)
|
document.body.appendChild(anchor)
|
||||||
anchor.click()
|
anchor.click()
|
||||||
document.body.removeChild(anchor)
|
// Cleaning up requires a timeout to work under Firefox
|
||||||
|
setTimeout(() => {
|
||||||
URL.revokeObjectURL(imageURL)
|
document.body.removeChild(anchor)
|
||||||
|
URL.revokeObjectURL(imageURL)
|
||||||
|
}, 100)
|
||||||
|
return { status: true }
|
||||||
}
|
}
|
||||||
}, [name, response])
|
}, [name, response])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user