LibJS: Allow to stringify empty Values without side effects

This commit is contained in:
Hendiadyoin1 2022-12-12 20:07:59 +01:00 committed by Linus Groh
commit 09fa3a17c7
Notes: sideshowbarker 2024-07-16 23:43:12 +09:00

View file

@ -390,6 +390,8 @@ ErrorOr<String> Value::to_string_without_side_effects() const
return String::formatted("[object {}]", as_object().class_name());
case ACCESSOR_TAG:
return "<accessor>"_string;
case EMPTY_TAG:
return "<empty>"_string;
default:
VERIFY_NOT_REACHED();
}