File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/runtime-tags/src/translator/util Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ export function trackParamsReferences(
271
271
section ,
272
272
paramsBinding ,
273
273
undefined ,
274
- addNumericPropertiesUntil ( undefined , i - 1 ) ,
274
+ i > 0 ? addNumericPropertiesUntil ( undefined , i - 1 ) : undefined ,
275
275
) ;
276
276
} else if ( t . isLVal ( param ) ) {
277
277
createBindingsAndTrackReferences (
@@ -532,10 +532,10 @@ function createBindingsAndTrackReferences(
532
532
i ++ ;
533
533
if ( element ) {
534
534
if ( element . type === "RestElement" ) {
535
- excludeProperties = addNumericPropertiesUntil (
536
- excludeProperties ,
537
- i - 1 ,
538
- ) ;
535
+ excludeProperties =
536
+ i > 0
537
+ ? addNumericPropertiesUntil ( excludeProperties , i - 1 )
538
+ : undefined ;
539
539
createBindingsAndTrackReferences (
540
540
element . argument ,
541
541
type ,
@@ -1702,7 +1702,7 @@ function setCanonicalExtra(extra: t.NodeExtra, merged: t.NodeExtra) {
1702
1702
1703
1703
function addNumericPropertiesUntil ( props : Opt < string > , len : number ) {
1704
1704
let result = props ;
1705
- for ( let i = len ; i -- >= 0 ; ) {
1705
+ for ( let i = len ; i -- ; ) {
1706
1706
result = propsUtil . add ( result , i + "" ) ;
1707
1707
}
1708
1708
return result ;
You can’t perform that action at this time.
0 commit comments