File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ class ReflectService {
39
39
if ( ! ctx . runtime . plugin ) return
40
40
// Case 4: custom inject checks
41
41
if ( ctx . bail ( ctx , 'internal/inject' , name ) ) return
42
+ const lines = error . stack ! . split ( '\n' )
43
+ lines . splice ( 1 , 1 )
44
+ error . stack = lines . join ( '\n' )
42
45
ctx . emit ( ctx , 'internal/warning' , error )
43
46
}
44
47
@@ -53,9 +56,6 @@ class ReflectService {
53
56
const [ name , internal ] = ReflectService . resolveInject ( target , prop )
54
57
// trace caller
55
58
const error = new Error ( `property ${ name } is not registered, declare it as \`inject\` to suppress this warning` )
56
- const lines = error . stack ! . split ( '\n' )
57
- lines . splice ( 1 , 1 )
58
- error . stack = lines . join ( '\n' )
59
59
if ( ! internal ) {
60
60
ReflectService . checkInject ( ctx , name , error )
61
61
return Reflect . get ( target , name , ctx )
You can’t perform that action at this time.
0 commit comments