diff options
author | bptato <nincsnevem662@gmail.com> | 2023-06-18 11:40:28 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-06-18 11:40:28 +0200 |
commit | aecd7e7d69cab7499f07d1ca40541402bbeb286b (patch) | |
tree | 80efbcb1c0c64b33fc382b9e268fccf4c994ba7d | |
parent | 1ae5f2a85d833631c399eab6d756b6fabf105aca (diff) | |
download | chawan-aecd7e7d69cab7499f07d1ca40541402bbeb286b.tar.gz |
Add typeerror to jsgctor
-rw-r--r-- | src/js/javascript.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/js/javascript.nim b/src/js/javascript.nim index 9afff65a..deda1ca5 100644 --- a/src/js/javascript.nim +++ b/src/js/javascript.nim @@ -1442,7 +1442,7 @@ macro jsgctor*(fun: typed) = gen.jsCallAndRet = quote do: block `dl`: return ctx.toJS(`jfcl`) - return JS_UNDEFINED + return JS_ThrowTypeError(ctx, "Invalid parameters passed to constructor") discard gen.newJSProc(getJSParams()) gen.registerConstructor() result = newStmtList(fun) |