fix: unused routing parameters, and related usage - #5604
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
GVodyanov
left a comment
There was a problem hiding this comment.
Hey! Thanks for looking into this
One issue though, in newContact():
if (this.selectedCircle) {
emit('contacts:circles:append', this.selectedCircle.id) selectedCircle comes from RouterMixin as $route.params.selectedCircle, so it's the circle id string, not a Circle model — .id is undefined. This
was latent before because isCirclesView never evaluated true, but switching the guard to selectedCircle makes the branch reachable. The result is
MemberList setting pickerCircle = undefined and addMembersToCircle({ circleId: undefined }) failing with "There was an issue adding members to the team".
Should just be:
emit('contacts:circles:append', this.selectedCircle) So basically when clicking on "add member" on a teams page the adding doesn't work.
Signed-off-by: Roberto Guido <info@madbob.org>
08bb339 to
0cb678b
Compare
|
Oops... I totally missed that... |
Navigating the app in dev mode, the JS console is filled with warnings like:
I've investigated a bit, and I've found that
selectedGrouphas been introduced in the routing parameters in a0a80c9 to fix #4090.With the migration to Vue3, and the upgrade of vue-router, unused routing parameters are discarded by the router (as described here), and the changes introduced in a0a80c9 broke again.
So I have mostly reverted that commit, and introduced a different approach to select how and when display the "Import Contacts" buttons.
Accidentally, this also fix #5257