Skip to content

Commit b5e07d3

Browse files
committed
fix onEvent handling
1 parent ca292ba commit b5e07d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/app/src/sessions.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export function useRRWebEventStream(
311311
pageParam: number;
312312
limit?: number;
313313
}) => {
314-
if (!source || !onEvent) return;
314+
if (!source) return;
315315
const resBuffer: any[] = [];
316316
let linesFetched = 0;
317317

@@ -394,7 +394,7 @@ export function useRRWebEventStream(
394394
});
395395

396396
let forFunc: (data: any) => void;
397-
if (onEvent != null) {
397+
if (onEvent) {
398398
forFunc = onEvent;
399399
} else if (keepPreviousData) {
400400
forFunc = (data: any) => resBuffer.push(data);

0 commit comments

Comments
 (0)