Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1312 from kppullin/patch-1

Fix invalid array index generation in fml.coffee
  • Loading branch information...
commit f78097d38145455c0e1faa79c548f8ffc95f0c0e 2 parents 068ec13 + c44c99a
@technicalpickles technicalpickles authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/scripts/fml.coffee
View
2  src/scripts/fml.coffee
@@ -22,7 +22,7 @@ fml = (msg) ->
.http('http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=10&q=http://feeds.feedburner.com/fmylife')
.get() (err, res, body) ->
fmls = JSON.parse(body)
- random = Math.round(Math.random() * fmls.responseData.feed.entries.length)
+ random = Math.floor(Math.random() * fmls.responseData.feed.entries.length)
text = fmls.responseData.feed.entries[random].content
text = text[0..text.indexOf('<img')-1]
msg.send text
Please sign in to comment.
Something went wrong with that request. Please try again.