diff --git a/crates/napi/src/bindgen_runtime/js_values/object.rs b/crates/napi/src/bindgen_runtime/js_values/object.rs index 50d3b11d..027a8b26 100644 --- a/crates/napi/src/bindgen_runtime/js_values/object.rs +++ b/crates/napi/src/bindgen_runtime/js_values/object.rs @@ -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)?)