Skip to content

Commit acbc848

Browse files
committed
fix: handle find() when root node is placeholder comment
1 parent 331d78d commit acbc848

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vueWrapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export class VueWrapper<T extends ComponentPublicInstance>
123123
const result = this.parentElement['__vue_app__']
124124
? // force using the parentElement to allow finding the root element
125125
this.parentElement.querySelector(selector)
126-
: this.element.querySelector(selector)
126+
: this.element.querySelector && this.element.querySelector(selector)
127127

128128
if (result) {
129129
return new DOMWrapper(result)

0 commit comments

Comments
 (0)