Meteor-Community-Packages / meteor-roles

Authorization package for Meteor, compatible with built-in accounts packages
http://meteor-community-packages.github.io/meteor-roles/
MIT License
920 stars 164 forks source link

roles.common line 782, rev is undefined #318

Closed ggerber closed 3 years ago

ggerber commented 4 years ago

Hi,

I received the above error in my browser console.

I am unable to reproduce it at the moment as the error does not occur consistently.

This is probably similar to closed issue #311, r is undefined

SimonSimCity commented 4 years ago

Can you please provide me with a sample? I cannot think of a possibility how this could be.

https://github.com/Meteor-Community-Packages/meteor-roles/blob/1694e596f3a000f2c2e74eea67d9cf2b85581be6/roles/roles_common.js#L780-L787

In the latest version (which as of the time writing is 3.2.2) I give the function reduce() an empty array and let the reducer return this very same array - unless the property current.inheritedRoles is truethy, in which case I return the result of a array.concat() function, which in any case should again return an array - so I'm very curious to see a sample.

SimonSimCity commented 3 years ago

Closed due to lack of feedback. As it seems similar to #311, which was closed in v3.2.1, I expect it to be fixed in the latest version.