Skip to content

Commit

Permalink
docs: fix CDN example fetcher text fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie authored and acao committed Jan 10, 2020
1 parent 3c5e329 commit 734b5ee
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions examples/graphiql-cdn/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,8 @@
body: JSON.stringify(graphQLParams),
credentials: 'include',
}).then(function(response) {
try {
return response.json();
} catch (error) {
return response.text();
}
return response.json()
.catch(function () { return response.text(); });
});
}

Expand Down

0 comments on commit 734b5ee

Please sign in to comment.