diff --git a/Userland/Libraries/LibJS/Runtime/Object.cpp b/Userland/Libraries/LibJS/Runtime/Object.cpp index 45af10a7e6..3975b0a05d 100644 --- a/Userland/Libraries/LibJS/Runtime/Object.cpp +++ b/Userland/Libraries/LibJS/Runtime/Object.cpp @@ -696,8 +696,6 @@ ThrowCompletionOr Object::internal_define_own_property(PropertyKey const& // 10.1.7 [[HasProperty]] ( P ), https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-hasproperty-p ThrowCompletionOr Object::internal_has_property(PropertyKey const& property_name) const { - auto& vm = this->vm(); - // 1. Assert: IsPropertyKey(P) is true. VERIFY(property_name.is_valid()); @@ -714,10 +712,7 @@ ThrowCompletionOr Object::internal_has_property(PropertyKey const& propert // 5. If parent is not null, then if (parent) { // a. Return ? parent.[[HasProperty]](P). - auto result = parent->internal_has_property(property_name); - if (auto* exception = vm.exception()) - return throw_completion(exception->value()); - return result; + return parent->internal_has_property(property_name); } // 6. Return false.