diff options
author | bptato <nincsnevem662@gmail.com> | 2024-05-06 20:23:28 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-05-06 20:28:15 +0200 |
commit | 1e2cfd58f0fa5e063d7a36da918ec2523474b66e (patch) | |
tree | 44729ec09d9e4aff1bfe6230a8be3f445646601e /src/local/client.nim | |
parent | 95566264c474935d6e010adfcb4a7f8daf1ad812 (diff) | |
download | chawan-1e2cfd58f0fa5e063d7a36da918ec2523474b66e.tar.gz |
js: fix compilation on 1.6.14
* resolve empty promises without params, not a single undefined param (we can't just unsafeAddr constants on 1.6.14, and I don't see why we need to pass undefined?) * same in client with InternalError * explicitly convert static `asglobal' to bool (1.6.14 turns unquoted enums into ints...)
Diffstat (limited to 'src/local/client.nim')
-rw-r--r-- | src/local/client.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/local/client.nim b/src/local/client.nim index 9038488a..237ee284 100644 --- a/src/local/client.nim +++ b/src/local/client.nim @@ -179,7 +179,7 @@ proc jsQuit(client: Client; code: uint32 = 0): JSValue {.jsfunc: "quit".} = client.exitCode = int(code) let ctx = client.jsctx let ctor = ctx.getOpaque().errCtorRefs[jeInternalError] - let err = JS_CallConstructor(ctx, ctor, 1, JS_UNDEFINED.toJSValueArray()) + let err = JS_CallConstructor(ctx, ctor, 0, nil) JS_SetUncatchableError(ctx, err, true); return JS_Throw(ctx, err) |