Skip to content

Commit

Permalink
fix: Pass full object to ObjectToPrimitive flag
Browse files Browse the repository at this point in the history
  • Loading branch information
afyef committed Dec 7, 2024
1 parent d32ddf9 commit 396d2fb
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(key.clone()));
result.add_flag(Flag::ObjectToPrimitive(obj.clone()));
return Ok(result);
}
_ => {}
Expand Down

0 comments on commit 396d2fb

Please sign in to comment.