mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibJS: Convert has_property() to ThrowCompletionOr
This commit is contained in:
@@ -225,9 +225,7 @@ ThrowCompletionOr<Vector<String>> canonicalize_locale_list(GlobalObject& global_
|
||||
auto property_key = PropertyName { k };
|
||||
|
||||
// b. Let kPresent be ? HasProperty(O, Pk).
|
||||
auto key_present = object->has_property(property_key);
|
||||
if (auto* exception = vm.exception())
|
||||
return throw_completion(exception->value());
|
||||
auto key_present = TRY(object->has_property(property_key));
|
||||
|
||||
// c. If kPresent is true, then
|
||||
if (key_present) {
|
||||
|
||||
Reference in New Issue
Block a user