mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +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
Notes:
sideshowbarker
2024-07-19 06:41:30 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/063228c02ec Pull-request: https://github.com/SerenityOS/serenity/pull/2206
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
Reference in a new issue