diff options
author | bptato <nincsnevem662@gmail.com> | 2023-06-19 20:56:06 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-06-19 20:56:06 +0200 |
commit | b3e08ac443d5d010938be7ae9b9bf8c04ca55300 (patch) | |
tree | d6c4ed711fa6553a95ae7b1b2e77d1d5d4926bd2 /src/display/client.nim | |
parent | 82fb1f70ab275884c42dd769b2af8f9df5389e88 (diff) | |
download | chawan-b3e08ac443d5d010938be7ae9b9bf8c04ca55300.tar.gz |
Reject fetch promise on network error
Instead of setting the non-standard res variable.
Diffstat (limited to 'src/display/client.nim')
-rw-r--r-- | src/display/client.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/display/client.nim b/src/display/client.nim index af4b3fb2..1c9e0b1f 100644 --- a/src/display/client.nim +++ b/src/display/client.nim @@ -91,7 +91,7 @@ proc `=destroy`(client: var ClientObj) = proc doRequest(client: Client, req: Request): Response {.jsfunc.} = return client.loader.doRequest(req) -proc fetch(client: Client, req: Request): Promise[Response] {.jsfunc.} = +proc fetch(client: Client, req: Request): FetchPromise {.jsfunc.} = return client.loader.fetch(req) proc interruptHandler(rt: JSRuntime, opaque: pointer): int {.cdecl.} = |