Skip to content

Commit

Permalink
refactor(ReplaySubject): switch back to using splice() instead of shi…
Browse files Browse the repository at this point in the history
…ft()
  • Loading branch information
martinsik committed Jun 22, 2017
1 parent a4e146e commit 43f8bac
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ReplaySubject.ts
Expand Up @@ -116,9 +116,7 @@ export class ReplaySubject<T> extends Subject<T> {
spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
}

for (let i = 0; i < spliceCount; i++) {
_events.shift();
}
_events.splice(0, spliceCount);

return _events;
}
Expand Down

0 comments on commit 43f8bac

Please sign in to comment.