about summary refs log tree commit diff stats
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/buffer.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/buffer.nim b/src/server/buffer.nim
index a1e273cc..7abac9e1 100644
--- a/src/server/buffer.nim
+++ b/src/server/buffer.nim
@@ -1426,10 +1426,11 @@ proc evalJSURL(buffer: Buffer; url: URL): Opt[string] =
     return err() # error
   if JS_IsUndefined(ret):
     return err() # no need to navigate
-  let s = ?fromJS[string](ctx, ret)
+  var res: string
+  ?ctx.fromJS(ret, res)
   JS_FreeValue(ctx, ret)
   # Navigate to result.
-  return ok(s)
+  return ok(res)
 
 proc click(buffer: Buffer; anchor: HTMLAnchorElement): ClickResult =
   var repaint = buffer.restoreFocus()