File tree Expand file tree Collapse file tree 2 files changed +21
-22
lines changed
packages/runtime-vapor/src Expand file tree Collapse file tree 2 files changed +21
-22
lines changed Original file line number Diff line number Diff line change @@ -413,9 +413,20 @@ function getAttrsProxy(instance: ComponentInternalInstance): Data {
413
413
) )
414
414
)
415
415
}
416
- const classifyRE = / (?: ^ | [ - _ ] ) ( \w ) / g
417
- const classify = ( str : string ) : string =>
418
- str . replace ( classifyRE , c => c . toUpperCase ( ) ) . replace ( / [ - _ ] / g, '' )
416
+
417
+ /**
418
+ * Dev-only
419
+ */
420
+ function getSlotsProxy ( instance : ComponentInternalInstance ) : Slots {
421
+ return (
422
+ instance . slotsProxy ||
423
+ ( instance . slotsProxy = new Proxy ( instance . slots , {
424
+ get ( target , key : string ) {
425
+ return target [ key ]
426
+ } ,
427
+ } ) )
428
+ )
429
+ }
419
430
420
431
export function getComponentName (
421
432
Component : Component ,
@@ -454,16 +465,6 @@ export function formatComponentName(
454
465
return name ? classify ( name ) : isRoot ? `App` : `Anonymous`
455
466
}
456
467
457
- /**
458
- * Dev-only
459
- */
460
- function getSlotsProxy ( instance : ComponentInternalInstance ) : Slots {
461
- return (
462
- instance . slotsProxy ||
463
- ( instance . slotsProxy = new Proxy ( instance . slots , {
464
- get ( target , key : string ) {
465
- return target [ key ]
466
- } ,
467
- } ) )
468
- )
469
- }
468
+ const classifyRE = / (?: ^ | [ - _ ] ) ( \w ) / g
469
+ const classify = ( str : string ) : string =>
470
+ str . replace ( classifyRE , c => c . toUpperCase ( ) ) . replace ( / [ - _ ] / g, '' )
Original file line number Diff line number Diff line change @@ -60,9 +60,10 @@ export function setDevtoolsHook(hook: DevtoolsHook, target: any) {
60
60
// (#4815)
61
61
typeof window !== 'undefined' &&
62
62
// some envs mock window but not fully
63
- window . HTMLElement // &&
63
+ window . HTMLElement &&
64
64
// also exclude jsdom
65
- // !window.navigator?.userAgent?.includes('jsdom')
65
+ // eslint-disable-next-line no-restricted-syntax
66
+ ! window . navigator ?. userAgent ?. includes ( 'jsdom' )
66
67
) {
67
68
const replay = ( target . __VUE_DEVTOOLS_HOOK_REPLAY__ =
68
69
target . __VUE_DEVTOOLS_HOOK_REPLAY__ || [ ] )
@@ -86,10 +87,7 @@ export function setDevtoolsHook(hook: DevtoolsHook, target: any) {
86
87
}
87
88
88
89
export function devtoolsInitApp ( app : App , version : string ) {
89
- emit ( DevtoolsHooks . APP_INIT , app , version , {
90
- Text,
91
- Comment,
92
- } )
90
+ emit ( DevtoolsHooks . APP_INIT , app , version , { } )
93
91
}
94
92
95
93
export function devtoolsUnmountApp ( app : App ) {
You can’t perform that action at this time.
0 commit comments