Skip to content

Commit ce04369

Browse files
authored
Fix out of bounds error in recreateBindingPattern (#1330)
1 parent 2877b6f commit ce04369

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/transformers/declarations/transform.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ func (tx *DeclarationTransformer) recreateBindingPattern(input *ast.BindingPatte
667667
return nil
668668
}
669669
if len(results) == 1 {
670-
return results[1]
670+
return results[0]
671671
}
672672
return tx.Factory().NewSyntaxList(results)
673673
}

0 commit comments

Comments
 (0)