mirror of https://github.com/langgenius/dify.git
Fix mem leak of URL.createObjectURL
This commit is contained in:
parent
ca1deb8f01
commit
a1abe98666
|
|
@ -39,9 +39,11 @@ export const useDSL = () => {
|
|||
})
|
||||
const a = document.createElement('a')
|
||||
const file = new Blob([data], { type: 'application/yaml' })
|
||||
a.href = URL.createObjectURL(file)
|
||||
const url = URL.createObjectURL(file)
|
||||
a.href = url
|
||||
a.download = `${knowledgeName}.pipeline`
|
||||
a.click()
|
||||
URL.revokeObjectURL(url)
|
||||
}
|
||||
catch {
|
||||
notify({ type: 'error', message: t('app.exportFailed') })
|
||||
|
|
|
|||
|
|
@ -39,9 +39,11 @@ export const useDSL = () => {
|
|||
})
|
||||
const a = document.createElement('a')
|
||||
const file = new Blob([data], { type: 'application/yaml' })
|
||||
a.href = URL.createObjectURL(file)
|
||||
const url = URL.createObjectURL(file)
|
||||
a.href = url
|
||||
a.download = `${appDetail.name}.yml`
|
||||
a.click()
|
||||
URL.revokeObjectURL(url)
|
||||
}
|
||||
catch {
|
||||
notify({ type: 'error', message: t('app.exportFailed') })
|
||||
|
|
|
|||
Loading…
Reference in New Issue