1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

fix(cli/napi): property with getter/setter always failed (#19562)

with `napi_define_properties`.
This commit is contained in:
Dj 2023-06-21 13:13:23 +05:30 committed by GitHub
parent 6729e9c977
commit c9e478056f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1559,7 +1559,7 @@ fn napi_define_properties(
let define_maybe = object.define_property(scope, name, &desc); let define_maybe = object.define_property(scope, name, &desc);
return_status_if_false!( return_status_if_false!(
env_ptr, env_ptr,
!define_maybe.unwrap_or(false), define_maybe.is_some(),
napi_invalid_arg napi_invalid_arg
); );
} else if property.method.is_some() { } else if property.method.is_some() {