Skip to content

Commit

Permalink
Merge branch 'rc' into 'dev'
Browse files Browse the repository at this point in the history
fix: not clear params between move to collection actions

See merge request locker/web!67
  • Loading branch information
duchunter committed Oct 19, 2023
2 parents 250c2d6 + 5d4f490 commit e4e8898
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/renderer/components/folder/MoveFolder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ export default {
ids: [],
folderId: '',
collections: [],
organizations: [],
ciphers: []
organizations: []
}
},
Expand All @@ -110,13 +109,14 @@ export default {
this.loading = true
const collection = this.collections.find(c => c.id === this.folderId)
const personalKey = await this.$cryptoService.getEncKey()
const promises = []
let promises = []
const ciphers = []
// Get decrypted ciphers list
this.ids.forEach(async id => {
const encCipher = await this.$cipherService.get(id)
const decCipher = await encCipher.decrypt()
this.ciphers.push({ ...decCipher, id })
ciphers.push({ ...decCipher, id })
promises.push(this.removeFromCollection(decCipher, personalKey))
})
Expand All @@ -132,7 +132,8 @@ export default {
const orgKey = await this.$cryptoService.getOrgKey(
collection.organizationId
)
this.ciphers.forEach(cipher => {
promises = []
ciphers.forEach(cipher => {
promises.push(this.addToCollection(cipher, orgKey, collection))
})
await Promise.all(promises)
Expand Down

0 comments on commit e4e8898

Please sign in to comment.