Skip to content

Commit 5bd33df

Browse files
committed
Fix the receive method not working without a dummy nstroke argument
1 parent 044ba85 commit 5bd33df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/binding.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ Value Send(const CallbackInfo& info) {
266266
Value Receive(const CallbackInfo& info) {
267267
Env env = info.Env();
268268

269-
if (info.Length() < 3) throw TypeError::New(env, "Wrong number of arguments");
269+
if (info.Length() < 2) throw TypeError::New(env, "Wrong number of arguments");
270270
if (!info[0].IsExternal()) throw TypeError::New(env, "Invalid 'context' value");
271271
if (!info[1].IsNumber()) throw TypeError::New(env, "Invalid 'device' value");
272272

0 commit comments

Comments
 (0)