diff --git a/meteor/server/publications/partsUI/publication.ts b/meteor/server/publications/partsUI/publication.ts index 379e47f31c..31af1ed031 100644 --- a/meteor/server/publications/partsUI/publication.ts +++ b/meteor/server/publications/partsUI/publication.ts @@ -190,7 +190,7 @@ export async function manipulateUIPartsPublicationData( meteorCustomPublish( MeteorPubSub.uiParts, CustomCollectionName.UIParts, - async function (pub, playlistId: RundownPlaylistId) { + async function (pub, playlistId: RundownPlaylistId | null) { check(playlistId, String) const credentials = await resolveCredentials({ userId: this.userId, token: undefined }) @@ -198,7 +198,7 @@ meteorCustomPublish( if ( !credentials || NoSecurityReadAccess.any() || - (await RundownPlaylistReadAccess.rundownPlaylistContent(playlistId, credentials)) + (playlistId && (await RundownPlaylistReadAccess.rundownPlaylistContent(playlistId, credentials))) ) { await setUpCollectionOptimizedObserver< Omit, diff --git a/packages/meteor-lib/src/api/pubsub.ts b/packages/meteor-lib/src/api/pubsub.ts index c0ec1c2e5b..49c18b7816 100644 --- a/packages/meteor-lib/src/api/pubsub.ts +++ b/packages/meteor-lib/src/api/pubsub.ts @@ -261,7 +261,7 @@ export interface MeteorPubSubTypes { bucketId: BucketId ) => CustomCollectionName.UIBucketContentStatuses [MeteorPubSub.uiBlueprintUpgradeStatuses]: () => CustomCollectionName.UIBlueprintUpgradeStatuses - [MeteorPubSub.uiParts]: (playlistId: RundownPlaylistId) => CustomCollectionName.UIParts + [MeteorPubSub.uiParts]: (playlistId: RundownPlaylistId | null) => CustomCollectionName.UIParts [MeteorPubSub.uiPartInstances]: ( playlistActivationId: RundownPlaylistActivationId | null ) => CustomCollectionName.UIPartInstances diff --git a/packages/webui/src/client/ui/Settings/components/triggeredActions/TriggeredActionEntry.tsx b/packages/webui/src/client/ui/Settings/components/triggeredActions/TriggeredActionEntry.tsx index a9db70ce75..8b1ec894b8 100644 --- a/packages/webui/src/client/ui/Settings/components/triggeredActions/TriggeredActionEntry.tsx +++ b/packages/webui/src/client/ui/Settings/components/triggeredActions/TriggeredActionEntry.tsx @@ -198,7 +198,7 @@ export const TriggeredActionEntry: React.FC = React.memo(function Trigge } return [] as IWrappedAdLib[] }, - [selected, resolvedActions, sourceLayers], + [selected, resolvedActions, sourceLayers, previewContext], [] as IWrappedAdLib[] ) diff --git a/packages/webui/src/client/ui/Settings/components/triggeredActions/TriggeredActionsEditor.tsx b/packages/webui/src/client/ui/Settings/components/triggeredActions/TriggeredActionsEditor.tsx index 9e21ffce8e..8a623bc773 100644 --- a/packages/webui/src/client/ui/Settings/components/triggeredActions/TriggeredActionsEditor.tsx +++ b/packages/webui/src/client/ui/Settings/components/triggeredActions/TriggeredActionsEditor.tsx @@ -192,7 +192,7 @@ export const TriggeredActionsEditor: React.FC = function TriggeredAction ) useSubscription(MeteorPubSub.uiPartInstances, rundownPlaylist?.activationId ?? null) - useSubscription(CorelibPubSub.parts, rundown ? [rundown._id] : [], null) + useSubscription(MeteorPubSub.uiParts, rundownPlaylist?._id ?? null) const previewContext = useTracker( () => {