Skip to content

Commit 811e716

Browse files
authored
perf: missing access to property cache (#759)
Signed-off-by: francesco <francesco.bagnoli.69@gmail.com>
1 parent 5889e63 commit 811e716

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,16 +580,18 @@ function buildArray (context, location) {
580580
if (schema.additionalItems) {
581581
functionCode += `
582582
for (let i = ${itemsSchema.length}; i < arrayLength; i++) {
583-
json += JSON.stringify(obj[i])
583+
value = obj[i]
584+
json += JSON.stringify(value)
584585
if (i < arrayEnd) {
585586
json += JSON_STR_COMMA
586587
}
587588
}`
588589
}
589590
} else {
590-
const code = buildValue(context, itemsLocation, 'obj[i]')
591+
const code = buildValue(context, itemsLocation, 'value')
591592
functionCode += `
592593
for (let i = 0; i < arrayLength; i++) {
594+
value = obj[i]
593595
${code}
594596
if (i < arrayEnd) {
595597
json += JSON_STR_COMMA

0 commit comments

Comments
 (0)