mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
LibJS: Convert Array AOs to ThrowCompletionOr
This commit is contained in:
parent
3426285738
commit
db5df26841
14 changed files with 37 additions and 64 deletions
|
@ -428,7 +428,7 @@ Object* JSONObject::parse_json_object(GlobalObject& global_object, const JsonObj
|
|||
|
||||
Array* JSONObject::parse_json_array(GlobalObject& global_object, const JsonArray& json_array)
|
||||
{
|
||||
auto* array = Array::create(global_object, 0);
|
||||
auto* array = MUST(Array::create(global_object, 0));
|
||||
size_t index = 0;
|
||||
json_array.for_each([&](auto& value) {
|
||||
array->define_direct_property(index++, parse_json_value(global_object, value), JS::default_attributes);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue