Skip to content

Commit 3389996

Browse files
authored
perf: avoid unnecessary assess to array item (#789)
Signed-off-by: francesco <francesco.bagnoli.69@gmail.com>
1 parent 144c271 commit 3389996

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ function buildArray (context, location) {
581581
const tmpRes = buildValue(context, itemsLocation.getPropertyLocation(i), 'value')
582582
functionCode += `
583583
if (${i} < arrayLength) {
584-
if (${buildArrayTypeCondition(item.type, `[${i}]`)}) {
584+
if (${buildArrayTypeCondition(item.type, 'value')}) {
585585
${tmpRes}
586586
if (${i} < arrayEnd) {
587587
json += JSON_STR_COMMA

0 commit comments

Comments
 (0)