File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ function find_surrounding_ssr_commments() {
60
60
function create_proxy_component ( new_component ) {
61
61
const component_signal = source ( new_component ) ;
62
62
63
- let component_name = '' ;
63
+ let component_name = new_component . name ;
64
64
65
65
/**
66
66
* @type {HotData["set_component"] }
@@ -122,19 +122,19 @@ function create_proxy_component(new_component) {
122
122
}
123
123
) ;
124
124
125
- try {
126
- Object . defineProperty ( proxy_component , 'name' , {
127
- get ( ) {
128
- return component_name ;
129
- }
130
- } ) ;
131
- } catch ( err ) {
132
- console . warn ( "[Svelte HMR] Failed to proxy component function's name" , err ) ;
133
- }
134
-
135
125
return accessors_proxy ;
136
126
}
137
127
128
+ try {
129
+ Object . defineProperty ( proxy_component , 'name' , {
130
+ get ( ) {
131
+ return component_name ;
132
+ }
133
+ } ) ;
134
+ } catch ( err ) {
135
+ console . warn ( "[Svelte HMR] Failed to proxy component function's name" , err ) ;
136
+ }
137
+
138
138
return { proxy_component, set_component } ;
139
139
}
140
140
You can’t perform that action at this time.
0 commit comments