Skip to content

Commit

Permalink
fix: handle find() when root node is placeholder comment
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusBorg committed Jun 11, 2021
1 parent 331d78d commit acbc848
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vueWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class VueWrapper<T extends ComponentPublicInstance>
const result = this.parentElement['__vue_app__']
? // force using the parentElement to allow finding the root element
this.parentElement.querySelector(selector)
: this.element.querySelector(selector)
: this.element.querySelector && this.element.querySelector(selector)

if (result) {
return new DOMWrapper(result)
Expand Down

0 comments on commit acbc848

Please sign in to comment.