Skip to content

Commit d46cfd3

Browse files
author
Simon he
committed
chore: update
1 parent 2881274 commit d46cfd3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/download.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { uuid } from "./uuid"
2-
export function download(url: string, name = uuid()) {
3-
const a = document.createElement('a')
2+
export function download(url: string) {
3+
let a: any = document.createElement('a')
44
a.href = url
55
a.download = url.substring(url.lastIndexOf('/') + 1, url.length)
66
a.click()
7+
a = null
78
}

0 commit comments

Comments
 (0)