From 8ef67efd835a9389e8b238582a999284f44f4c28 Mon Sep 17 00:00:00 2001 From: shweelan Date: Fri, 7 Sep 2018 01:06:30 +0300 Subject: [PATCH] Fix download error showing in console (#12) Fix error showing in safari/chrome console when download link is clicked --- client/devices-page.js | 4 +++- client/faults-page.js | 4 +++- client/presets-page.js | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/client/devices-page.js b/client/devices-page.js index 0ede1c8..b53843e 100644 --- a/client/devices-page.js +++ b/client/devices-page.js @@ -131,7 +131,9 @@ function renderTable( ); if (downloadUrl) - footerElements.push(m("a.download-csv", { href: downloadUrl }, "Download")); + footerElements.push( + m("a.download-csv", { href: downloadUrl, download: "" }, "Download") + ); let tfoot = m( "tfoot", diff --git a/client/faults-page.js b/client/faults-page.js index bccbf54..a70298a 100644 --- a/client/faults-page.js +++ b/client/faults-page.js @@ -125,7 +125,9 @@ function renderTable( ); if (downloadUrl) - footerElements.push(m("a.download-csv", { href: downloadUrl }, "Download")); + footerElements.push( + m("a.download-csv", { href: downloadUrl, download: "" }, "Download") + ); let tfoot = m( "tfoot", diff --git a/client/presets-page.js b/client/presets-page.js index f6c019a..1acb843 100644 --- a/client/presets-page.js +++ b/client/presets-page.js @@ -141,7 +141,9 @@ function renderTable( ); if (downloadUrl) - footerElements.push(m("a.download-csv", { href: downloadUrl }, "Download")); + footerElements.push( + m("a.download-csv", { href: downloadUrl, download: "" }, "Download") + ); let tfoot = m( "tfoot",