There was an error while loading. Please reload this page.
2 parents e64b08e + 874c9a6 commit 9a17a33Copy full SHA for 9a17a33
src/Servant/JS/Vanilla.hs
@@ -40,7 +40,7 @@ generateVanillaJSWith opts req = "\n" <>
40
<> " if (xhr.readyState === 4) {\n"
41
<> " if (xhr.status === 204 || xhr.status === 205) {\n"
42
<> " " <> onSuccess <> "();\n"
43
- <> " } else if (xhr.status >= 200 && xhr.status < 300 && xhr.responseType === 'json') {\n"
+ <> " } else if (xhr.status >= 200 && xhr.status < 300) {\n"
44
<> " try { res = JSON.parse(xhr.responseText); } catch (e) { " <> onError <> "(e); }\n"
45
<> " if (res) " <> onSuccess <> "(res);\n"
46
<> " } else {\n"
0 commit comments