Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Commit

Permalink
Add argument type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruoshi.Ling committed Aug 15, 2015
1 parent 54a64a5 commit be8e866
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/slack-msg-decoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ var SlackMsgDecoder = function(message) {
return new SlackMsgDecoder(message);
}

this.message = message;
if (typeof this.message == "string") {
this.message = message;
}
else {
console.log("[DEBUG] Got type error message:" + message)
this.message = "<Not string type message>"
}

this.channelMap = {};
this.userMap = {};
};
Expand Down

0 comments on commit be8e866

Please sign in to comment.