Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Little code enhancement to prevent false errors #27

Open
thebarty opened this issue Mar 20, 2017 · 0 comments
Open

Little code enhancement to prevent false errors #27

thebarty opened this issue Mar 20, 2017 · 0 comments

Comments

@thebarty
Copy link

Hi guys,

just got an error in this line https://github.com/mizzao/meteor-partitioner/blob/master/grouping.coffee#L118. If there is NO user, then we get an

39mException while invoking method 'xxx TypeError: Cannot read property 'admin' of undefined
�[34mI20170320-13:58:40.429(0)? �[39m    at Object.userFindHook (packages/mizzao_partitioner/grouping.coffee:118:20)

So I guess there should be a guard like return true if user.?admin and !groupId (I don't know coffescript, but saw this ? feature somewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants