Skip to content

Commit

Permalink
fix: Wrap obj in Value::Object for ObjectToPrimitive flag
Browse files Browse the repository at this point in the history
  • Loading branch information
revidious committed Dec 7, 2024
1 parent 396d2fb commit feaedb0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl TypeCoercer for LiteralValue {
match inner_value {
jsonish::Value::Number(_) | jsonish::Value::Boolean(_) | jsonish::Value::String(_) => {
let mut result = self.coerce(ctx, target, Some(inner_value))?;
result.add_flag(Flag::ObjectToPrimitive(obj.clone()));
result.add_flag(Flag::ObjectToPrimitive(jsonish::Value::Object(obj.clone())));
return Ok(result);
}
_ => {}
Expand Down

0 comments on commit feaedb0

Please sign in to comment.