aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/models')
-rw-r--r--catalog-ui/src/app/models/base-pubsub.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/catalog-ui/src/app/models/base-pubsub.ts b/catalog-ui/src/app/models/base-pubsub.ts
index b9ff788a57..c4b109f1d5 100644
--- a/catalog-ui/src/app/models/base-pubsub.ts
+++ b/catalog-ui/src/app/models/base-pubsub.ts
@@ -97,6 +97,12 @@ export class BasePubSub {
}
}
+ public isWaitingForEvent(eventName: string) : boolean {
+ return Array.from(this.eventsToWait.values()).some((eventsList: Array<string>) =>
+ eventsList.indexOf(eventName) !== -1
+ );
+ }
+
protected onMessage(event: any) {
if (this.subscribers.has(event.data.originId)) {
this.eventsCallbacks.forEach((callback: Function) => {