From ca172baba83398ef0b9ab65d1314ace6f60f3ea2 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 11 Nov 2020 08:52:57 +0100 Subject: [PATCH] MOBILE-3507 push: Fix click push with no site --- src/core/pushnotifications/providers/delegate.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/pushnotifications/providers/delegate.ts b/src/core/pushnotifications/providers/delegate.ts index 94297132c..6f4683590 100644 --- a/src/core/pushnotifications/providers/delegate.ts +++ b/src/core/pushnotifications/providers/delegate.ts @@ -124,7 +124,10 @@ export class CorePushNotificationsDelegate { * @return Promise resolved with boolean: whether the handler feature is disabled. */ protected isFeatureDisabled(handler: CorePushNotificationsClickHandler, siteId: string): Promise { - if (handler.featureName) { + if (!siteId) { + // Notification doesn't belong to a site. Assume all handlers are enabled. + return Promise.resolve(false); + } else if (handler.featureName) { // Check if the feature is disabled. return this.sitesProvider.isFeatureDisabled(handler.featureName, siteId); } else {