mirror of
https://github.com/napi-rs/napi-rs.git
synced 2025-12-08 19:56:07 +00:00
fix(napi): in "Object::get", return null values wrapped in a "Some"
This commit is contained in:
parent
556732d4c4
commit
a5f3b2e78c
@ -35,7 +35,7 @@ impl Object {
|
||||
|
||||
let ty = type_of!(self.0.env, ret)?;
|
||||
|
||||
Ok(if ty == ValueType::Undefined || ty == ValueType::Null {
|
||||
Ok(if ty == ValueType::Undefined {
|
||||
None
|
||||
} else {
|
||||
Some(V::from_napi_value(self.0.env, ret)?)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user