File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/svelte/src/compiler/phases/3-transform/client/visitors Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1775,7 +1775,7 @@ export const template_visitors = {
1775
1775
1776
1776
/** @type {import('estree').Expression[] } */
1777
1777
const args = [ context . state . node ] ;
1778
- node . arguments . forEach ( ( arg ) => {
1778
+ for ( const arg of node . arguments ) {
1779
1779
if ( arg . type === 'SpreadElement' ) {
1780
1780
// this is a spread operation, meaning we need to thunkify all of its members, which we can't
1781
1781
// do until runtime
@@ -1787,7 +1787,7 @@ export const template_visitors = {
1787
1787
return ;
1788
1788
}
1789
1789
args . push ( b . thunk ( /** @type {import('estree').Expression } */ ( context . visit ( arg ) ) ) ) ;
1790
- } ) ;
1790
+ }
1791
1791
1792
1792
let snippet_function = /** @type {import('estree').Expression } */ (
1793
1793
context . visit ( node . expression )
@@ -2483,7 +2483,9 @@ export const template_visitors = {
2483
2483
/** @type {import('estree').Statement[] } */
2484
2484
const declarations = [ ] ;
2485
2485
2486
- node . context . elements . forEach ( ( argument , i ) => {
2486
+ for ( let i = 0 ; i < node . context . elements . length ; i ++ ) {
2487
+ const argument = node . context . elements [ i ] ;
2488
+
2487
2489
if ( ! argument ) return ;
2488
2490
2489
2491
if ( argument . type === 'Identifier' ) {
@@ -2547,7 +2549,7 @@ export const template_visitors = {
2547
2549
2548
2550
binding . expression = b . call ( name ) ;
2549
2551
}
2550
- } ) ;
2552
+ }
2551
2553
2552
2554
body = b . block ( [
2553
2555
...declarations ,
You can’t perform that action at this time.
0 commit comments