Skip to content
This repository was archived by the owner on Feb 17, 2019. It is now read-only.

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: #30 Reviewed-By: NickNaso <[email protected]>
1 parent b6f3e8b commit 75ee5e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
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)