Skip to content

Commit 4d991aa

Browse files
committed
fix(EAV-450): missing null activePlaylist update when playlist gets deactivated
1 parent 058610d commit 4d991aa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/live-status-gateway/src/collections/segmentHandler.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,8 @@ export class SegmentHandler extends PublicationCollection<DBSegment, CorelibPubS
4848

4949
private updateAndNotifyCurrentSegment() {
5050
const collection = this.getCollectionOrFail()
51-
if (this._currentSegmentId) {
52-
this._collectionData = collection.findOne(this._currentSegmentId)
53-
this.notify(this._collectionData)
54-
}
51+
this._collectionData = this._currentSegmentId ? collection.findOne(this._currentSegmentId) : undefined
52+
this.notify(this._collectionData)
5553
}
5654

5755
private onPlaylistUpdate = (playlist: Playlist | undefined): void => {

0 commit comments

Comments
 (0)