We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 946c26f commit 10b46f9Copy full SHA for 10b46f9
src/mocks/intersection-observer.ts
@@ -168,6 +168,8 @@ export class MockedIntersectionObserver implements IntersectionObserver {
168
}
169
170
triggerNodes(nodeDescriptions: NodeIntersectionDescription[]) {
171
+ if (nodeDescriptions.length === 0) return;
172
+
173
const nodeIndexes = nodeDescriptions.map(({ node }) =>
174
findNodeIndex(this.nodes, node)
175
);
0 commit comments