Skip to content

Commit ca172ba

Browse files
committed
MOBILE-3507 push: Fix click push with no site
1 parent 93c8c15 commit ca172ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/pushnotifications/providers/delegate.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ export class CorePushNotificationsDelegate {
124124
* @return Promise resolved with boolean: whether the handler feature is disabled.
125125
*/
126126
protected isFeatureDisabled(handler: CorePushNotificationsClickHandler, siteId: string): Promise<boolean> {
127-
if (handler.featureName) {
127+
if (!siteId) {
128+
// Notification doesn't belong to a site. Assume all handlers are enabled.
129+
return Promise.resolve(false);
130+
} else if (handler.featureName) {
128131
// Check if the feature is disabled.
129132
return this.sitesProvider.isFeatureDisabled(handler.featureName, siteId);
130133
} else {

0 commit comments

Comments
 (0)