Skip to content
Snippets Groups Projects
Commit ff4859ed authored by Greg Fodor's avatar Greg Fodor
Browse files

Skip toggling logic for subscriptions if registration is not set

parent 74818739
No related branches found
No related tags found
No related merge requests found
......@@ -74,6 +74,8 @@ export default class Subscriptions {
};
toggle = async () => {
if (!this.registration) return;
if (this._isSubscribed) {
const pushSubscription = await this.registration.pushManager.getSubscription();
const res = await this.hubChannel.unsubscribe(pushSubscription);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment