MOBILE-3507 push: Fix click push with no site

main
Dani Palou 2020-11-11 08:52:57 +01:00
parent 93c8c157bf
commit ca172baba8
1 changed files with 4 additions and 1 deletions

View File

@ -124,7 +124,10 @@ export class CorePushNotificationsDelegate {
* @return Promise resolved with boolean: whether the handler feature is disabled. * @return Promise resolved with boolean: whether the handler feature is disabled.
*/ */
protected isFeatureDisabled(handler: CorePushNotificationsClickHandler, siteId: string): Promise<boolean> { protected isFeatureDisabled(handler: CorePushNotificationsClickHandler, siteId: string): Promise<boolean> {
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. // Check if the feature is disabled.
return this.sitesProvider.isFeatureDisabled(handler.featureName, siteId); return this.sitesProvider.isFeatureDisabled(handler.featureName, siteId);
} else { } else {