Fix nesting array parsing

This commit is contained in:
Vladimir Grichina 2019-01-08 23:46:11 -08:00
parent f736f48359
commit bf4fffab1c

View File

@ -165,8 +165,9 @@ export class JSONDecoder<JSONHandlerT extends JSONHandler> {
if (this.peekChar() != "[".charCodeAt(0)) { if (this.peekChar() != "[".charCodeAt(0)) {
return false; return false;
} }
if (this.handler.pushArray(this.state.lastKey)) { let key = this.state.lastKey;
this.state.lastKey = null; this.state.lastKey = null;
if (this.handler.pushArray(key)) {
this.readChar(); this.readChar();
this.skipWhitespace(); this.skipWhitespace();