From 09fa3a17c7efee4e792c768fe5eca381f1c51317 Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Mon, 12 Dec 2022 20:07:59 +0100 Subject: [PATCH] LibJS: Allow to stringify empty Values without side effects --- Userland/Libraries/LibJS/Runtime/Value.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibJS/Runtime/Value.cpp b/Userland/Libraries/LibJS/Runtime/Value.cpp index 52483f3fb7..0dd7bbc2d6 100644 --- a/Userland/Libraries/LibJS/Runtime/Value.cpp +++ b/Userland/Libraries/LibJS/Runtime/Value.cpp @@ -390,6 +390,8 @@ ErrorOr Value::to_string_without_side_effects() const return String::formatted("[object {}]", as_object().class_name()); case ACCESSOR_TAG: return ""_string; + case EMPTY_TAG: + return ""_string; default: VERIFY_NOT_REACHED(); }