Skip to content

Commit

Permalink
refactor(files): cleanup reduce function on potential upload
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmcg committed Feb 28, 2022
1 parent eadff99 commit 514324d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/views/files/controls/Controls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ export default Vue.extend({
// if these files go over the storage limit, prevent upload
if (
this.$FileSystem.totalSize +
originalFiles.reduce((total, curr) => total + curr.size, 0) >
this.$Config.personalFilesLimit
originalFiles.reduce(
(total, curr) => total + curr.size,
this.$FileSystem.totalSize,
) > this.$Config.personalFilesLimit
) {
this.errors.push(this.$t('pages.files.errors.limit') as string)
return
Expand Down

0 comments on commit 514324d

Please sign in to comment.