fix(napi): in "Object::get", return null values wrapped in a "Some"

This commit is contained in:
jkomyno 2024-01-31 15:50:58 +01:00
parent 556732d4c4
commit a5f3b2e78c

View file

@ -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)?)