Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed May 18, 2017
1 parent 4b4c2b4 commit 7e5e449
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tenso",
"description": "Tensō is an elastic REST API gateway for node.js",
"version": "4.5.2",
"version": "4.5.3",
"homepage": "http://avoidwork.github.io/tenso",
"author": "Jason Mulligan <[email protected]>",
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions www/assets/js/app.es6
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
loading = modal.querySelector(".loading"),
textarea = document.querySelector("textarea"),
resBody = modal.querySelector(".body"),
json = /^[\[\{"]/;
json = /^[\[\{"]/,
isJson = /application\/json/;

if (methods.childElementCount > 0) {
form.setAttribute("method", methods.options[methods.selectedIndex].value);
Expand Down Expand Up @@ -89,7 +90,7 @@
throw res;
}

return json ? res.json() : res.text();
return isJson.test(res.headers.get("content-type") || "") ? res.json() : res.text();
}).then(arg => {
window.requestAnimationFrame(() => {
resBody.innerText = arg.data;
Expand Down
5 changes: 3 additions & 2 deletions www/assets/js/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7e5e449

Please sign in to comment.