Skip to content

Commit

Permalink
fix(ShareEntryLinkedList): Correctly propagate share data
Browse files Browse the repository at this point in the history
`this.shares.unshift` mutates the share object for every component that uses
the share mixin.

Using the immutable approach changes the array reference which makes the mixin
lose track of the share object.

It would have been better to bubble up the share object but here we are :)

Signed-off-by: fenn-cs <[email protected]>
  • Loading branch information
nfebe committed Jun 12, 2024
1 parent 141c2ef commit 50f6498
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_sharing/src/views/SharingLinkList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default {
*/
addShare(share, resolve) {
// eslint-disable-next-line vue/no-mutating-props
this.shares = [share, ...this.shares]
this.shares.unshift(share)
this.awaitForShare(share, resolve)
},

Expand Down

0 comments on commit 50f6498

Please sign in to comment.