Skip to content

Commit caa0e3e

Browse files
committed
tempfix: use 0 for sint64 if a string is passed instead of number or bigint
1 parent 21d2f11 commit caa0e3e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/TypeConv.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,9 @@ void toNative(napi_env env, napi_value value, void *result, bool *shouldFree,
332332
case napi_null:
333333
*(int64_t *)result = 0;
334334
break;
335+
case napi_string:
336+
*(int64_t *)result = 0;
337+
break;
335338
default:
336339
napi_throw_type_error(env, nullptr, "Expected a number or bigint");
337340
break;

0 commit comments

Comments
 (0)