Skip to content

Commit

Permalink
Attempt to fix rauchg#201 by adding defensive statement (rauchg#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanh authored and rauchg committed Oct 22, 2016
1 parent 499451e commit 8967c35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/slack.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default class SlackData extends EventEmitter {

let users = res.body.members

if (!users) {
if (!users || (users && !users.length)) {
let err = new Error(`Invalid Slack response: ${res.status}`)
this.emit('error', err)
return this.retry()
Expand Down

0 comments on commit 8967c35

Please sign in to comment.