Skip to content

Commit

Permalink
Merge pull request #58 from zzzzBov/patch-1
Browse files Browse the repository at this point in the history
Fix ResizeObserver.disconnect
  • Loading branch information
trurl-master authored Aug 5, 2024
2 parents 78cfd7d + a000c90 commit f6d3640
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mocks/resize-observer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ class MockedResizeObserver implements ResizeObserver {
};

disconnect = () => {
this.observationTargets.clear();

for (const node of this.observationTargets) {
const targetObservers = state.targetObservers.get(node);

Expand All @@ -100,6 +98,8 @@ class MockedResizeObserver implements ResizeObserver {
}
}
}

this.observationTargets.clear();
};
}

Expand Down

0 comments on commit f6d3640

Please sign in to comment.