aboutsummaryrefslogtreecommitdiffstats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-12-28 23:04:21 +0100
committerbptato <nincsnevem662@gmail.com>2024-12-28 23:04:21 +0100
commitf057c2385ed982781e41bf45ebf5b3d3a63a7e0e (patch)
treef4ea6c07bf4ad88eddd0c1efe86e6905038f967a /src/html
parent4a16faf8a87266aec6fecfae29664838ea01c172 (diff)
downloadchawan-f057c2385ed982781e41bf45ebf5b3d3a63a7e0e.tar.gz
xhr: fix flipped exception in overrideMimeType
Diffstat (limited to 'src/html')
-rw-r--r--src/html/xmlhttprequest.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/html/xmlhttprequest.nim b/src/html/xmlhttprequest.nim
index 560a54e9..9fff6c1d 100644
--- a/src/html/xmlhttprequest.nim
+++ b/src/html/xmlhttprequest.nim
@@ -393,7 +393,7 @@ proc responseText(ctx: JSContext; this: XMLHttpRequest): JSValue {.jsfget.} =
proc overrideMimeType(this: XMLHttpRequest; s: string): DOMResult[void]
{.jsfunc.} =
- if this.readyState notin {xhrsLoading, xhrsDone}:
+ if this.readyState in {xhrsLoading, xhrsDone}:
return errDOMException("readyState must not be loading or done",
"InvalidStateError")
#TODO parse