Skip to content

Commit d78d348

Browse files
author
John Doe
committed
refactor: wip
1 parent a46bb31 commit d78d348

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/utils/src/lib/performance-observer.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ export class PerformanceObserverSink<T>
2424
#sink: Sink<T, unknown>;
2525
#observer: PerformanceObserver | undefined;
2626
readonly #observedTypes: EntryType[] = ['mark', 'measure'];
27-
#getEntries = (list: {
27+
#getEntries = (listOrGlobal: {
2828
getEntriesByType: (t: EntryType) => PerformanceEntry[];
29-
}) => this.#observedTypes.flatMap(t => list.getEntriesByType(t));
29+
}) => this.#observedTypes.flatMap(t => listOrGlobal.getEntriesByType(t));
3030
#observedCount: number = 0;
3131

3232
constructor(options: PerformanceObserverOptions<T>) {
@@ -72,9 +72,6 @@ export class PerformanceObserverSink<T>
7272
});
7373
});
7474

75-
// In real PerformanceObserver, entries remain in the global buffer
76-
// They are only cleared when explicitly requested via performance.clearMarks/clearMeasures
77-
7875
this.#observedCount = 0;
7976
}
8077

0 commit comments

Comments
 (0)