We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 811e9ea + 486f34e commit ef466d7Copy full SHA for ef466d7
lib/downloads.ts
@@ -32,14 +32,5 @@ export const generateDownloadLink = (
32
ext: "pdf" | "csv"
33
): void => {
34
const path = buildDownloadPath(filename, ext);
35
- try {
36
- const anchor = document.createElement("a");
37
- anchor.href = path;
38
- anchor.target = "_blank";
39
- document.body.appendChild(anchor);
40
- anchor.click();
41
- document.body.removeChild(anchor);
42
- } catch (_err) {
43
- // Swallow errors silently; caller may choose to add its own handling.
44
- }
+ window.open(path, "_blank");
45
};
pages/downloads/[...key].tsx
0 commit comments