Skip to content

Commit

Permalink
Fix merge scan
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote committed Sep 30, 2020
1 parent 17c4435 commit 9f6a53b
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,11 @@ function countErrors(errors$: Observable<Error>, countInterval: number): Observa
).pipe(
// When tag is "flush", reset the error counter
// Otherwise increment the error counter
mergeScan(
({ count }, next) =>
next === FLUSH_MARKER
? of(emitErrorCount(count), resetErrorCount())
: of(incementErrorCount(count)),
emitErrorCount(0)
),
mergeScan(({ count }, next) => {
return next === FLUSH_MARKER
? of(emitErrorCount(count), resetErrorCount())
: of(incementErrorCount(count));
}, emitErrorCount(0)),
filter(isEmitEvent),
map(({ count }) => count)
);
Expand Down

0 comments on commit 9f6a53b

Please sign in to comment.