Skip to content

Commit ec67765

Browse files
fix
1 parent 5c37dc9 commit ec67765

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/PageCollector.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ export type ListenerMap<EventMap extends PageEvents = PageEvents> = {
1818
};
1919

2020
function createIdGenerator() {
21-
// TODO: Reset after max
2221
let i = 1;
2322
return () => {
23+
if (i === Number.MAX_SAFE_INTEGER) {
24+
i = 0;
25+
}
2426
return i++;
2527
};
2628
}

0 commit comments

Comments
 (0)