Skip to content

Commit

Permalink
destructur selector from this
Browse files Browse the repository at this point in the history
  • Loading branch information
seanpdoyle committed Dec 22, 2022
1 parent 4bc0e6d commit 0178b27
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/mutation-observers/selector_observer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ export class SelectorObserver implements AttributeObserverDelegate, ElementObser
}

elementUnmatchedAttribute() {
if (this.selector) {
const matchedElements = this.matchesByElement.getValuesForKey(this.selector)
const { selector } = this

if (selector) {
const matchedElements = this.matchesByElement.getValuesForKey(selector)

for (const matchedElement of matchedElements) {
this.selectorUnmatched(matchedElement, this.selector)
this.selectorUnmatched(matchedElement, selector)
}
}

Expand Down

0 comments on commit 0178b27

Please sign in to comment.