fix: [code-682]: update useDownloadRawfile hook (#328)

This commit is contained in:
Calvin Lee 2023-08-16 19:28:22 +00:00 committed by Harness
parent f5eae579c6
commit 8659a44226

View File

@ -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])