Skip to content

Commit

Permalink
Avoid error when there are no giphys to set for matching
Browse files Browse the repository at this point in the history
  • Loading branch information
Gino Bustelo committed Aug 28, 2016
1 parent b05ff75 commit 8b06eda
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/missions/giphy_match.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ challenge.prototype.onPost = function(post, reply){

getGiphyToMatch(this.game).then(
function(giphy_to_match){
if(!giphy_to_match){
return;
}
var giphy = post.Giphy;
var matches = giphy.id === giphy_to_match.id;
if(matches){
Expand Down

0 comments on commit 8b06eda

Please sign in to comment.