Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Check for further errors when generating memes #96

Merged
merged 2 commits into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 3, 2011
  1. @ab9
Commits on Nov 4, 2011
  1. @ab9
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/scripts/meme_generator.coffee
View
2  src/scripts/meme_generator.coffee
@@ -71,7 +71,7 @@ memeGenerator = (msg, generatorID, imageID, text0, text1, callback) ->
text1: text1
.get() (err, res, body) ->
result = JSON.parse(body)['result']
- if result['instanceUrl']? and result['instanceImageUrl']?
+ if result? and result['instanceUrl']? and result['instanceImageUrl']?
instanceURL = result['instanceUrl']
img = "http://memegenerator.net" + result['instanceImageUrl']
msg.http(instanceURL).get() (err, res, body) ->
Something went wrong with that request. Please try again.