Skip to content

Commit 8b4cab1

Browse files
committed
Applied requested changes
Signed-off-by: Juergen Kellerer <[email protected]>
1 parent da7e5eb commit 8b4cab1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/store/files.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,13 @@ const actions = {
148148
/**
149149
* Append or update given files
150150
*
151-
* @param {object} context the store mutations
151+
* @param {object.commit} commit the store mutation commit function
152+
* @param {object.state} state the store state
152153
* @param {Array} files list of files
153154
* @return {Array} the appended files
154155
*/
155-
appendFiles(context, files = []) {
156-
context.commit('updateFiles', files)
156+
appendFiles({ commit, state }, files = []) {
157+
commit('updateFiles', files)
157158
return files.filter(file => !!state.files[file.fileid])
158159
},
159160

@@ -178,7 +179,7 @@ const actions = {
178179
const semaphore = new Semaphore(5)
179180

180181
const files = fileIds
181-
.map(fileId => state.files[fileId])
182+
.map(fileId => context.state.files[fileId])
182183
.reduce((files, file) => ({ ...files, [file.fileid]: file }), {})
183184

184185
fileIds.forEach(fileId => context.commit('deleteFile', fileId))

0 commit comments

Comments
 (0)