File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed
packages/svelte/src/compiler Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -1036,7 +1036,7 @@ const common_visitors = {
10361036 // If the same identifiers in the same order are used in another bind:group, they will be in the same group.
10371037 // (there's an edge case where `bind:group={a[i]}` will be in a different group than `bind:group={a[j]}` even when i == j,
10381038 // but this is a limitation of the current static analysis we do; it also never worked in Svelte 4)
1039- const bindings = expression_ids . map ( ( id ) => context . state . scope . get ( id . name ) ) ;
1039+ const bindings = expression_ids . map ( ( id ) => context . state . scope . get ( id . name ) ?? id ) ;
10401040 let group_name ;
10411041 outer: for ( const [ b , group ] of context . state . analysis . binding_groups ) {
10421042 if ( b . length !== bindings . length ) continue ;
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export interface ComponentAnalysis extends Analysis {
6868 inject_styles : boolean ;
6969 reactive_statements : Map < LabeledStatement , ReactiveStatement > ;
7070 /** Identifiers that make up the `bind:group` expression -> internal group binding name */
71- binding_groups : Map < Array < Binding | null > , Identifier > ;
71+ binding_groups : Map < Array < Binding | Identifier | null > , Identifier > ;
7272 slot_names : Set < string > ;
7373}
7474
Original file line number Diff line number Diff line change @@ -108,11 +108,8 @@ export function extract_all_identifiers_from_expression(expr) {
108108 expr ,
109109 { } ,
110110 {
111- Identifier ( node , { path } ) {
112- const parent = path . at ( - 1 ) ;
113- if ( parent ?. type !== 'MemberExpression' || parent . property !== node || parent . computed ) {
114- nodes . push ( node ) ;
115- }
111+ Identifier ( node ) {
112+ nodes . push ( node ) ;
116113 }
117114 }
118115 ) ;
You can’t perform that action at this time.
0 commit comments