File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -237,14 +237,15 @@ export default class Wrapper implements BaseWrapper {
237
237
*/
238
238
findComponent ( rawSelector : Selector ) : Wrapper | ErrorWrapper {
239
239
const selector = getSelector ( rawSelector , 'findComponent' )
240
- if ( selector . type === DOM_SELECTOR ) {
240
+ if ( ! this . vm ) {
241
241
throwError (
242
- 'findComponent requires a Vue constructor or valid find object. If you are searching for DOM nodes, use `find` instead '
242
+ 'You cannot chain findComponent off a DOM element. It can only be used on Vue Components. '
243
243
)
244
244
}
245
- if ( ! this . vm ) {
245
+
246
+ if ( selector . type === DOM_SELECTOR ) {
246
247
throwError (
247
- 'You cannot chain findComponent off a DOM element. It can only be used on Vue Components. '
248
+ 'findComponent requires a Vue constructor or valid find object. If you are searching for DOM nodes, use `find` instead '
248
249
)
249
250
}
250
251
You can’t perform that action at this time.
0 commit comments