Skip to content

Commit

Permalink
perf: missing access to property cache
Browse files Browse the repository at this point in the history
Signed-off-by: francesco <[email protected]>
  • Loading branch information
cesco69 authored Jan 17, 2025
1 parent 5889e63 commit d523b0d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,16 +580,18 @@ function buildArray (context, location) {
if (schema.additionalItems) {
functionCode += `
for (let i = ${itemsSchema.length}; i < arrayLength; i++) {
json += JSON.stringify(obj[i])
value = obj[i]
json += JSON.stringify(value)
if (i < arrayEnd) {
json += JSON_STR_COMMA
}
}`
}
} else {
const code = buildValue(context, itemsLocation, 'obj[i]')
const code = buildValue(context, itemsLocation, 'value')
functionCode += `
for (let i = 0; i < arrayLength; i++) {
value = obj[i]
${code}
if (i < arrayEnd) {
json += JSON_STR_COMMA
Expand Down

0 comments on commit d523b0d

Please sign in to comment.