Skip to content

Commit 13264bb

Browse files
committed
fix: Cannot replace infinite PieceInstance during normal operation SOFIE-3305
Pieces are deleted by setting them to `null`, so a `.has` check will match deleted pieces which is not desired
1 parent 0e6a301 commit 13264bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/job-worker/src/playout/model/implementation/PlayoutPartInstanceModelImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ export class PlayoutPartInstanceModelImpl implements PlayoutPartInstanceModel {
384384
}
385385

386386
for (const pieceInstance of pieceInstances) {
387-
if (this.pieceInstancesImpl.has(pieceInstance._id))
387+
if (this.pieceInstancesImpl.get(pieceInstance._id))
388388
throw new Error(
389389
`Cannot replace infinite PieceInstance "${pieceInstance._id}" as it replaces a non-infinite`
390390
)

0 commit comments

Comments
 (0)