Skip to content

Commit 9d18161

Browse files
committed
fix: use functional component name in vmMatchesName
1 parent 62dec1c commit 9d18161

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/test-utils/src/matches.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function vmMatchesName(vm, name) {
1010
// We want to mirror how Vue resolves component names in SFCs:
1111
// For example, <test-component />, <TestComponent /> and `<testComponent />
1212
// all resolve to the same component
13-
const componentName = (vm.$options && vm.$options.name) || ''
13+
const componentName = vm.name || (vm.$options && vm.$options.name) || ''
1414
return (
1515
!!name &&
1616
(componentName === name ||

0 commit comments

Comments
 (0)