Skip to content

Commit

Permalink
Update src/wait-for-element-to-be-removed.js
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored Jan 12, 2021
1 parent dfd3333 commit 36c6d63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wait-for-element-to-be-removed.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function waitForElementToBeRemoved(callback, options) {
const elements = Array.isArray(callback) ? callback : [callback]
const getRemainingElements = elements.map(element => {
let parent = element.parentElement
if(!parent) return () => null
if(parent === null) return () => null
while (parent.parentElement) parent = parent.parentElement
return () => (parent.contains(element) ? element : null)
})
Expand Down

0 comments on commit 36c6d63

Please sign in to comment.