Skip to content

Commit

Permalink
napi_ref for all value types is experimental (nodejs/node#47975)
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi committed May 13, 2023
1 parent c4855c8 commit dc4edc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/emnapi/src/life.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function napi_create_reference (
$CHECK_ARG!(envObject, result)

const handle = emnapiCtx.handleStore.get(value)!
if (!('moduleApiVersion' in envObject) || (envObject.moduleApiVersion <= 8)) {
if (envObject.moduleApiVersion !== Version.NAPI_VERSION_EXPERIMENTAL) {
if (!(handle.isObject() || handle.isFunction() || handle.isSymbol())) {
return envObject.setLastError(napi_status.napi_invalid_arg)
}
Expand Down

0 comments on commit dc4edc8

Please sign in to comment.