Skip to content

Commit

Permalink
doc: hello addon example should return "world"
Browse files Browse the repository at this point in the history
The N-API version of the hello example, returned "hello" instead of
"world".

PR-URL: nodejs#26328
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information
geirha authored and BridgeAR committed Mar 5, 2019
1 parent 49f1bb9 commit 9a2025c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ napi_value Method(napi_env env, napi_callback_info args) {
napi_value greeting;
napi_status status;

status = napi_create_string_utf8(env, "hello", NAPI_AUTO_LENGTH, &greeting);
status = napi_create_string_utf8(env, "world", NAPI_AUTO_LENGTH, &greeting);
if (status != napi_ok) return nullptr;
return greeting;
}
Expand Down

0 comments on commit 9a2025c

Please sign in to comment.