Skip to content

Commit

Permalink
org: fix org set validation
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Jan 18, 2019
1 parent 46cdebe commit 5948a10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/org.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function orgSet (org, user, role, opts) {
if (!user) {
throw new Error('Second argument `username` is required.')
}
if (!['owner', 'admin', 'developer'].find(role)) {
if (!['owner', 'admin', 'developer'].find(x => x === role)) {
throw new Error('Third argument `role` must be one of `owner`, `admin`, or `developer`, with `developer` being the default value if omitted.')
}
return liborg.set(org, user, role, opts).then(memDeets => {
Expand Down

0 comments on commit 5948a10

Please sign in to comment.