File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
packages/svelte/src/compiler/phases/2-analyze/visitors Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 44import { get_rune } from '../../scope.js' ;
55import * as e from '../../../errors.js' ;
66import { is_state_creation_rune } from '../../../../utils.js' ;
7+ import { get_name } from '../../nodes.js' ;
78
89/**
910 * @param {ClassBody } node
@@ -32,12 +33,8 @@ export function ClassBody(node, context) {
3233 * @param {Expression | null | undefined } value
3334 */
3435 function handle ( node , key , value ) {
35- const name =
36- ( key . type === 'Literal' && String ( key . value ) ) ||
37- ( key . type === 'PrivateIdentifier' && '#' + key . name ) ||
38- ( key . type === 'Identifier' && key . name ) ;
39-
40- if ( ! name ) return ;
36+ const name = get_name ( key ) ;
37+ if ( name === null ) return ;
4138
4239 const rune = get_rune ( value , context . state . scope ) ;
4340
You can’t perform that action at this time.
0 commit comments