Skip to content

Commit 1cd18e6

Browse files
committed
Fixed jserror
1 parent c177560 commit 1cd18e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cppsrc/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Snowflake::Snowflake(const Napi::CallbackInfo &info) : Napi::ObjectWrap<Snowflak
8686
{
8787
auto argLen = info.Length();
8888
if (argLen != 2)
89-
Napi::TypeError::New(env, "Expected two arguments.").ThrowAsJavaScriptException();
89+
Napi::TypeError::New(info.Env(), "Expected two arguments.").ThrowAsJavaScriptException();
9090

9191
this->_CUSTOM_EPOCH = info[0].As<Napi::Number>().Int64Value();
9292
// If the number is bigger than maxNodeId than those bits will be fall off

0 commit comments

Comments
 (0)