From de5080bb1e8a347909e4c4f90454d62c2718bd61 Mon Sep 17 00:00:00 2001 From: francesco Date: Fri, 26 Sep 2025 10:59:26 +0200 Subject: [PATCH] perf: avoid unnecessary assess to array item Signed-off-by: francesco --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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