diff --git a/Libraries/LibJS/Runtime/Object.cpp b/Libraries/LibJS/Runtime/Object.cpp index c7088155c98..f233426cda7 100644 --- a/Libraries/LibJS/Runtime/Object.cpp +++ b/Libraries/LibJS/Runtime/Object.cpp @@ -477,7 +477,7 @@ Value Object::to_primitive(PreferredType preferred_type) const Value Object::to_string() const { auto to_string_property = get("toString"); - if (!to_string_property.is_empty() && to_string_property.is_function()) { + if (to_string_property.is_function()) { auto& to_string_function = to_string_property.as_function(); auto& interpreter = const_cast(this)->interpreter(); auto to_string_result = interpreter.call(to_string_function, const_cast(this));