Skip to content

Commit 75ee5e5

Browse files
committed
fix sample to use Call
In this example we should be using Call not MakeCallback. Update to be consistent with the napi example PR-URL: nodejs/abi-stable-node-addon-examples#30 Reviewed-By: NickNaso <nicoladelgobbo@gmail.com>
1 parent b6f3e8b commit 75ee5e5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

3_callbacks/node-addon-api/addon.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
void RunCallback(const Napi::CallbackInfo& info) {
44
Napi::Env env = info.Env();
55
Napi::Function cb = info[0].As<Napi::Function>();
6-
cb.MakeCallback(env.Global(), { Napi::String::New(env, "hello world") });
6+
cb.Call(env.Global(), { Napi::String::New(env, "hello world") });
77
}
88

99
Napi::Object Init(Napi::Env env, Napi::Object exports) {

0 commit comments

Comments
 (0)