Skip to content

Commit

Permalink
Merge pull request #71 from Cojad/master
Browse files Browse the repository at this point in the history
fix type message undefined error(temporary solution...)
  • Loading branch information
shernshiou committed May 24, 2016
2 parents 9c95b3f + 92c4250 commit f089d5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Bot.prototype._poll = function () {
self.offset = msg.update_id + 1;

if (self.parseCommand) {
if (msg.message.text && msg.message.text.charAt(0) === '/') {
if (msg.message && msg.message.text && msg.message.text.charAt(0) === '/') {
/**
* Split the message on space and @
* Zero part = complete message
Expand Down

0 comments on commit f089d5d

Please sign in to comment.