Skip to content

Commit

Permalink
If the user has no threads at all, this is undefined.
Browse files Browse the repository at this point in the history
  • Loading branch information
mehcode committed Feb 5, 2016
1 parent fda8574 commit 8d2bb41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/getThreadList.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = function(defaultFuncs, api, ctx) {
throw resData;
}
log.verbose("Response in getThreadList: " + JSON.stringify(resData.payload.threads));
return callback(null, resData.payload.threads.map(utils.formatThread));
return callback(null, (resData.payload.threads || []).map(utils.formatThread));
})
.catch(function(err) {
log.error("Error in getThreadList", err);
Expand Down

0 comments on commit 8d2bb41

Please sign in to comment.