Skip to content

Commit 5c76401

Browse files
committed
fix: prevent deopt
1 parent 0e20257 commit 5c76401

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/parser.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,17 +232,17 @@ function pushArrayCache (parser, array, pos) {
232232
* @returns {undefined|any[]}
233233
*/
234234
function parseArrayChunks (parser) {
235-
const tmp = parser.arrayCache.pop()
235+
var arr = parser.arrayCache.pop()
236236
var pos = parser.arrayPos.pop()
237237
if (parser.arrayCache.length) {
238238
const res = parseArrayChunks(parser)
239239
if (res === undefined) {
240-
pushArrayCache(parser, tmp, pos)
240+
pushArrayCache(parser, arr, pos)
241241
return
242242
}
243-
tmp[pos++] = res
243+
arr[pos++] = res
244244
}
245-
return parseArrayElements(parser, tmp, pos)
245+
return parseArrayElements(parser, arr, pos)
246246
}
247247

248248
/**

0 commit comments

Comments
 (0)