mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
LibJS: Convert has_property() to ThrowCompletionOr
This commit is contained in:
parent
a29b7a3ec7
commit
f38a5957bf
11 changed files with 53 additions and 135 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue