about summary refs log tree commit diff stats
path: root/src/html/env.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-06-19 20:56:06 +0200
committerbptato <nincsnevem662@gmail.com>2023-06-19 20:56:06 +0200
commitb3e08ac443d5d010938be7ae9b9bf8c04ca55300 (patch)
treed6c4ed711fa6553a95ae7b1b2e77d1d5d4926bd2 /src/html/env.nim
parent82fb1f70ab275884c42dd769b2af8f9df5389e88 (diff)
downloadchawan-b3e08ac443d5d010938be7ae9b9bf8c04ca55300.tar.gz
Reject fetch promise on network error
Instead of setting the non-standard res variable.
Diffstat (limited to 'src/html/env.nim')
-rw-r--r--src/html/env.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/html/env.nim b/src/html/env.nim
index a70508be..eba067a8 100644
--- a/src/html/env.nim
+++ b/src/html/env.nim
@@ -61,7 +61,7 @@ proc addNavigatorModule(ctx: JSContext) =
   ctx.registerType(PluginArray)
   ctx.registerType(MimeTypeArray)
 
-proc fetch(window: Window, req: Request): Promise[Response] {.jsfunc.} =
+proc fetch(window: Window, req: Request): FetchPromise {.jsfunc.} =
   if window.loader.isSome:
     return window.loader.get.fetch(req)