File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/svelte/src/compiler/migrate Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -948,13 +948,13 @@ const instance_script = {
948948 const [ , expression_ids ] = extract_all_identifiers_from_expression (
949949 node . body . expression . right
950950 ) ;
951- const bindings = ids . map ( ( id ) => state . scope . get ( id . name ) ) ;
952- const reassigned_bindings = bindings . filter ( ( b ) => b ? .reassigned ) ;
951+ const bindings = ids . map ( ( id ) => /** @type { Binding } */ ( state . scope . get ( id . name ) ) ) ;
952+ const reassigned_bindings = bindings . filter ( ( b ) => b . reassigned ) ;
953953
954- if ( ! bindings . some ( ( b ) => b ? .kind === 'state' ) ) {
954+ if ( ! bindings . some ( ( b ) => b . kind === 'state' ) ) {
955955 if (
956956 node . body . expression . right . type !== 'Literal' &&
957- ! bindings . some ( ( b ) => b ? .kind === 'store_sub' ) &&
957+ ! bindings . some ( ( b ) => b . kind === 'store_sub' ) &&
958958 node . body . expression . left . type !== 'MemberExpression'
959959 ) {
960960 let { start, end } = /** @type {{ start: number, end: number } } */ (
@@ -1001,7 +1001,7 @@ const instance_script = {
10011001 ) ;
10021002 }
10031003 }
1004- if ( expression_ids . length === 0 && ! bindings . some ( ( b ) => b ? .kind === 'store_sub' ) ) {
1004+ if ( expression_ids . length === 0 && ! bindings . some ( ( b ) => b . kind === 'store_sub' ) ) {
10051005 state . str . remove ( /** @type {number } */ ( node . start ) , /** @type {number } */ ( node . end ) ) ;
10061006 return ;
10071007 }
You can’t perform that action at this time.
0 commit comments