Skip to content

Commit

Permalink
Add support for viewing Gists of other users
Browse files Browse the repository at this point in the history
As well as fix a bug with Gist support pointing to `viewer` and not
`user`.
  • Loading branch information
bswinnerton committed Jul 26, 2017
1 parent ea90302 commit c2e474f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Contents/Scripts/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ class Account {
let result = GraphQL.execute(query, variables);

if (result) {
if (result.data && result.data.viewer) {
return result.data.viewer.gists.edges;
if (result.data && result.data.user) {
return result.data.user.gists.edges;
} else {
return [];
}
Expand Down
Loading

0 comments on commit c2e474f

Please sign in to comment.