summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ReflectObject.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ReflectObject.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp b/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
index ac2d057d17..bec3c3c746 100644
--- a/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
@@ -192,9 +192,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::get_own_property_descriptor)
return {};
// 3. Let desc be ? target.[[GetOwnProperty]](key).
- auto descriptor = target.as_object().internal_get_own_property(key);
- if (vm.exception())
- return {};
+ auto descriptor = TRY_OR_DISCARD(target.as_object().internal_get_own_property(key));
// 4. Return FromPropertyDescriptor(desc).
return from_property_descriptor(global_object, descriptor);