@@ -3,6 +3,7 @@ import { getFirstComponentChild } from 'core/vdom/helpers/index'
33import type VNode from 'core/vdom/vnode'
44import type { VNodeComponentOptions } from 'types/vnode'
55import type { Component } from 'types/component'
6+ import { getComponentName } from '../vdom/create-component'
67
78type CacheEntry = {
89 name ?: string
@@ -12,8 +13,8 @@ type CacheEntry = {
1213
1314type CacheEntryMap = Record < string , CacheEntry | null >
1415
15- function getComponentName ( opts ?: VNodeComponentOptions ) : string | null {
16- return opts && ( opts . Ctor . options . name || opts . tag )
16+ function _getComponentName ( opts ?: VNodeComponentOptions ) : string | null {
17+ return opts && ( getComponentName ( opts . Ctor . options as any ) || opts . tag )
1718}
1819
1920function matches (
@@ -81,7 +82,7 @@ export default {
8182 if ( vnodeToCache ) {
8283 const { tag, componentInstance, componentOptions } = vnodeToCache
8384 cache [ keyToCache ] = {
84- name : getComponentName ( componentOptions ) ,
85+ name : _getComponentName ( componentOptions ) ,
8586 tag,
8687 componentInstance
8788 }
@@ -126,7 +127,7 @@ export default {
126127 const componentOptions = vnode && vnode . componentOptions
127128 if ( componentOptions ) {
128129 // check pattern
129- const name = getComponentName ( componentOptions )
130+ const name = _getComponentName ( componentOptions )
130131 const { include, exclude } = this
131132 if (
132133 // not included
0 commit comments