diff --git a/index.js b/index.js index 019c65fe..1bcb115d 100644 --- a/index.js +++ b/index.js @@ -581,7 +581,7 @@ function buildArray (context, location) { const tmpRes = buildValue(context, itemsLocation.getPropertyLocation(i), 'value') functionCode += ` if (${i} < arrayLength) { - if (${buildArrayTypeCondition(item.type, `[${i}]`)}) { + if (${buildArrayTypeCondition(item.type, 'value')}) { ${tmpRes} if (${i} < arrayEnd) { json += JSON_STR_COMMA