X-Git-Url: https://git.josue.xyz/?p=dotfiles%2F.git;a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Frxjs%2Fsrc%2Finternal%2FReplaySubject.ts;h=7a91bdde807f28ca881385a72fafea025c44c219;hp=d6d8eb7dfd3bea416b98ada0c01b2dd279755a1f;hb=4d07c77cf4d78cab8639e13ddc3c22495e585b0b;hpb=b3950616b54221c40a7dab9099bda675007e5b6e diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/src/internal/ReplaySubject.ts b/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/src/internal/ReplaySubject.ts index d6d8eb7d..7a91bdde 100644 --- a/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/src/internal/ReplaySubject.ts +++ b/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/src/internal/ReplaySubject.ts @@ -35,21 +35,23 @@ export class ReplaySubject extends Subject { } private nextInfiniteTimeWindow(value: T): void { - const _events = this._events; - _events.push(value); - // Since this method is invoked in every next() call than the buffer - // can overgrow the max size only by one item - if (_events.length > this._bufferSize) { - _events.shift(); + if (!this.isStopped) { + const _events = this._events; + _events.push(value); + // Since this method is invoked in every next() call than the buffer + // can overgrow the max size only by one item + if (_events.length > this._bufferSize) { + _events.shift(); + } } - super.next(value); } private nextTimeWindow(value: T): void { - this._events.push(new ReplayEvent(this._getNow(), value)); - this._trimBufferThenGetEvents(); - + if (!this.isStopped) { + this._events.push(new ReplayEvent(this._getNow(), value)); + this._trimBufferThenGetEvents(); + } super.next(value); }