From 39c28c4d33779823d606d57831ae394f3fd23abc Mon Sep 17 00:00:00 2001 From: filippofinke Date: Tue, 15 Feb 2022 22:21:01 +0100 Subject: [PATCH] refactor: change files to filesInUpload --- frontend/src/store/getters.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/store/getters.js b/frontend/src/store/getters.js index 1506afd5..ebcfa0cf 100644 --- a/frontend/src/store/getters.js +++ b/frontend/src/store/getters.js @@ -13,7 +13,7 @@ const getters = { let sum = state.upload.progress.reduce((acc, val) => acc + val); return Math.ceil((sum / totalSize) * 100); }, - files: (state) => { + filesInUpload: (state) => { let files = []; for (let index in state.upload.uploads) { @@ -26,7 +26,7 @@ const getters = { files.push({ id, name, progress: Math.ceil((progress / size) * 100) }); } - return files; + return files.sort((a, b) => a.progress - b.progress); }, };