Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add error if you do not specify gist id

  • Loading branch information...
commit 16f39cdecf13fb29c00a3122a8b949605f652b56 1 parent 2677c7d
@meritt authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  src/gisty.coffee
View
2  src/gisty.coffee
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.