AK: Use JsonArray::append when parsing array

This commit is contained in:
Cameron Youell 2023-04-17 15:51:17 +10:00 committed by Andreas Kling
parent 8134dccdc7
commit ada6dbf636
Notes: sideshowbarker 2024-07-17 06:38:11 +09:00

View File

@ -164,7 +164,7 @@ ErrorOr<JsonValue> JsonParser::parse_array()
if (peek() == ']')
break;
auto element = TRY(parse_helper());
array.must_append(move(element));
TRY(array.append(move(element)));
ignore_while(is_space);
if (peek() == ']')
break;