mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
committed by
Andreas Kling
parent
fbeaf76f96
commit
063228c02e
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user