Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3148,7 +3148,7 @@ Afterward, additional manipulation of the wrapper's prototype chain may cause

*Note*: Calling `napi_wrap()` a second time on an object that already has a
native instance associated with it by virtue of a previous call to
`napi_wrap()` will cause an error to be returned. If you wish to associate
`napi_wrap()` will cause an error to be returned. In order to associate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Get rid of In order:

To associate another native instance with the given object...

Nit: Consider getting rid of *Note*: at the start of this paragraph.

Nit: Get rid of that already has a native instance associated with it by virtue of a previous call to `napi_wrap()`. The sentence already says a second time and adding all that wordy context just makes it confusing. Also s/cause an error to be returned/return an error/. Also s/given//. Also.... Aw heck, here's what I think this whole too-long paragraph should be reduced to:

Calling napi_wrap() a second time on an object will return an error. To associate
another native instance with the object, use napi_remove_wrap() first.

another native instance with the given object, call `napi_remove_wrap()` on it
first.

Expand Down