mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Codegen: Do not subtract 0 in arguments to rest array loop
This commit is contained in:
@@ -1306,7 +1306,9 @@ namespace ts {
|
||||
createAssignment(
|
||||
createElementAccess(
|
||||
expressionName,
|
||||
createSubtract(temp, createLiteral(restIndex))
|
||||
restIndex === 0
|
||||
? temp
|
||||
: createSubtract(temp, createLiteral(restIndex))
|
||||
),
|
||||
createElementAccess(createIdentifier("arguments"), temp)
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user