Skip to content

Commit 9a17a33

Browse files
authored
Merge pull request #13 from minad/remove-response-type
Vanilla: remove invalid check of responseType
2 parents e64b08e + 874c9a6 commit 9a17a33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Servant/JS/Vanilla.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ generateVanillaJSWith opts req = "\n" <>
4040
<> " if (xhr.readyState === 4) {\n"
4141
<> " if (xhr.status === 204 || xhr.status === 205) {\n"
4242
<> " " <> onSuccess <> "();\n"
43-
<> " } else if (xhr.status >= 200 && xhr.status < 300 && xhr.responseType === 'json') {\n"
43+
<> " } else if (xhr.status >= 200 && xhr.status < 300) {\n"
4444
<> " try { res = JSON.parse(xhr.responseText); } catch (e) { " <> onError <> "(e); }\n"
4545
<> " if (res) " <> onSuccess <> "(res);\n"
4646
<> " } else {\n"

0 commit comments

Comments
 (0)