Skip to content

Commit

Permalink
refactor(shareReplay): Simplify code with a destructure (#6782)
Browse files Browse the repository at this point in the history
  • Loading branch information
benlesh committed Feb 20, 2022
1 parent 4ba8f9a commit 64caf87
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/internal/operators/shareReplay.ts
Expand Up @@ -159,10 +159,7 @@ export function shareReplay<T>(
let bufferSize: number;
let refCount = false;
if (configOrBufferSize && typeof configOrBufferSize === 'object') {
bufferSize = configOrBufferSize.bufferSize ?? Infinity;
windowTime = configOrBufferSize.windowTime ?? Infinity;
refCount = !!configOrBufferSize.refCount;
scheduler = configOrBufferSize.scheduler;
({ bufferSize = Infinity, windowTime = Infinity, refCount = false, scheduler } = configOrBufferSize);
} else {
bufferSize = configOrBufferSize ?? Infinity;
}
Expand Down

0 comments on commit 64caf87

Please sign in to comment.