Explorar el Código

Fix mem leak of URL.createObjectURL

tags/2.0.0-beta.2
Yongtao Huang hace 1 mes
padre
commit
a1abe98666

+ 3
- 1
web/app/components/rag-pipeline/hooks/use-DSL.ts Ver fichero

@@ -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') })

+ 3
- 1
web/app/components/workflow-app/hooks/use-DSL.ts Ver fichero

@@ -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') })

Cargando…
Cancelar
Guardar