diff --git a/lib/org.js b/lib/org.js index 38b7dbd27c798..d8f857e3dfdd9 100644 --- a/lib/org.js +++ b/lib/org.js @@ -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 => {