Skip to content

Commit 1395128

Browse files
committed
remove unnecessary DOM manipulation
1 parent a55af5d commit 1395128

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

app/javascript/controllers/csv_download_controller.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ export default class extends Controller {
2121
const anchor = document.createElement("a")
2222
anchor.href = objectUrl
2323
anchor.download = filename || "report.csv"
24-
document.body.appendChild(anchor)
2524
anchor.click()
26-
document.body.removeChild(anchor)
2725
URL.revokeObjectURL(objectUrl)
2826
})
2927
}

0 commit comments

Comments
 (0)