Skip to content

Commit f4e1108

Browse files
authored
Merge pull request Sofie-Automation#1269 from bbc/fix/ui-no-return-to-rundown-if-deleted
fix: In kiosk mode, rundown page gets stalled if rundown is removed
2 parents 101b369 + 7c4f1ae commit f4e1108

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/webui/src/client/lib/ReactMeteorData/ReactMeteorData.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ export function useSubscription<K extends keyof AllPubSubTypes>(
391391
/**
392392
* A Meteor Subscription hook that allows using React Functional Components and the Hooks API with Meteor subscriptions.
393393
* Subscriptions will be torn down 1000ms after unmounting the component.
394+
* If the subscription is not enabled, the subscription will not be created, and the ready state will always be true.
394395
*
395396
* @export
396397
* @param {PubSub} sub The subscription to be subscribed to
@@ -421,7 +422,7 @@ export function useSubscriptionIfEnabled<K extends keyof AllPubSubTypes>(
421422
}
422423
}, [sub, enable, stringifyObjects(args)])
423424

424-
return ready
425+
return !enable || ready
425426
}
426427

427428
/**

0 commit comments

Comments
 (0)