From 5a413a9e0704289866974744a62b84c779736e8b Mon Sep 17 00:00:00 2001 From: vitorsemeano Date: Sun, 8 Nov 2020 19:44:19 +0000 Subject: [PATCH] fix import for fileDownloader in itemDetails --- src/controllers/itemDetails/index.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/controllers/itemDetails/index.js b/src/controllers/itemDetails/index.js index 18d03166d..e6fc4942e 100644 --- a/src/controllers/itemDetails/index.js +++ b/src/controllers/itemDetails/index.js @@ -30,6 +30,7 @@ import itemShortcuts from '../../components/shortcuts'; import Dashboard from '../../scripts/clientUtils'; import ServerConnections from '../../components/ServerConnections'; import confirm from '../../components/confirm/confirm'; +import { download } from '../../scripts/fileDownloader'; function getPromise(apiClient, params) { const id = params.id; @@ -1958,14 +1959,12 @@ export default function (view, params) { } function onDownloadClick() { - import('../../scripts/fileDownloader').then(({ default: fileDownloader }) => { - const downloadHref = getApiClient().getItemDownloadUrl(currentItem.Id); - fileDownloader.download([{ - url: downloadHref, - itemId: currentItem.Id, - serverId: currentItem.serverId - }]); - }); + const downloadHref = getApiClient().getItemDownloadUrl(currentItem.Id); + download([{ + url: downloadHref, + itemId: currentItem.Id, + serverId: currentItem.serverId + }]); } function onMoreCommandsClick() {