From ac15f37153be771eebc8013c918cc0427c1ebbca Mon Sep 17 00:00:00 2001
From: Elias Asikainen <Elias@Elias-Asikainens-MacBook-Air-2.local>
Date: Sat, 17 Mar 2018 14:24:37 +0100
Subject: [PATCH] working download button for study docs

---
 src/views/studydocs/studydocList.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/views/studydocs/studydocList.js b/src/views/studydocs/studydocList.js
index 4861c727..29c149f5 100644
--- a/src/views/studydocs/studydocList.js
+++ b/src/views/studydocs/studydocList.js
@@ -94,8 +94,7 @@ export default class studydocList {
               m(Button, {
                 label: 'Download',
                 events: {
-                  onclick: () =>
-                    m.route.set('a', { href: `${apiUrl}${this.doc.file}`, target: '_blank' }, this.doc.title),
+                  onclick: () => window.open(`${apiUrl}${this.doc.files[0].file}`, '_blank'),
                 },
               }),
             ]),
-- 
GitLab