mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
LibJS: Allow to stringify empty Values without side effects
This commit is contained in:
parent
ec5d2a5144
commit
09fa3a17c7
1 changed files with 2 additions and 0 deletions
|
@ -390,6 +390,8 @@ ErrorOr<String> Value::to_string_without_side_effects() const
|
||||||
return String::formatted("[object {}]", as_object().class_name());
|
return String::formatted("[object {}]", as_object().class_name());
|
||||||
case ACCESSOR_TAG:
|
case ACCESSOR_TAG:
|
||||||
return "<accessor>"_string;
|
return "<accessor>"_string;
|
||||||
|
case EMPTY_TAG:
|
||||||
|
return "<empty>"_string;
|
||||||
default:
|
default:
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue