mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibJS: Handle empty values in operator<<()
Otherwise something like dbg() << Value(); chokes on ASSERT_NOT_REACHED() in Value::to_string()
This commit is contained in:
parent
fbeaf76f96
commit
063228c02e
1 changed files with 1 additions and 1 deletions
|
@ -370,7 +370,7 @@ Value instance_of(Interpreter&, Value lhs, Value rhs)
|
|||
|
||||
const LogStream& operator<<(const LogStream& stream, const Value& value)
|
||||
{
|
||||
return stream << value.to_string();
|
||||
return stream << (value.is_empty() ? "<empty>" : value.to_string());
|
||||
}
|
||||
|
||||
bool same_value(Interpreter& interpreter, Value lhs, Value rhs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue