Permalink
Browse files

Add error if you do not specify gist id

  • Loading branch information...
1 parent 2677c7d commit 16f39cdecf13fb29c00a3122a8b949605f652b56 @meritt committed Aug 16, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/gisty.coffee
View
@@ -18,10 +18,12 @@ class Gisty
@
fetch: (id, fn) ->
+ throw new Error 'You should specify gist id for fetch information' unless id?
@scheme = '/gists/' + id
request @, fn
comments: (id, fn) ->
+ throw new Error 'You should specify gist id for fetch comments' unless id?
@scheme = '/gists/' + id + '/comments'
request @, fn

0 comments on commit 16f39cd

Please sign in to comment.