Skip to content

Commit

Permalink
Fixed disconnectObservers() always disconnecting pageObservers
Browse files Browse the repository at this point in the history
  • Loading branch information
insin committed Mar 7, 2024
1 parent 715ce1b commit a22c5a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ function dedent(str) {
function disconnectObservers(observers, scope) {
if (observers.size == 0) return
log(
`disconnecting ${observers.size} ${scope} observer${s(pageObservers.size)}`,
Array.from(observers.values(), observer => observer.name)
`disconnecting ${observers.size} ${scope} observer${s(observers.size)}`,
Array.from(observers.keys())
)
logObserverDisconnects = false
for (let observer of pageObservers.values()) observer.disconnect()
for (let observer of observers.values()) observer.disconnect()
logObserverDisconnects = true
}

Expand Down

0 comments on commit a22c5a1

Please sign in to comment.