Skip to content

Little code enhancement to prevent false errors #27

@thebarty

Description

@thebarty

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions