From 1531a8b2f8f6441a9ede5e4fc76210c71b29d49a Mon Sep 17 00:00:00 2001 From: ntr Date: Thu, 29 Aug 2019 13:44:03 +1000 Subject: [PATCH] only prompt on unsub --- client/src/events.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/events.jsx b/client/src/events.jsx index 85348e78..876d184b 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -28,8 +28,9 @@ function registerEvents(store) { } function setSubscription(sub) { - if (sub.cancel_at_period_end) { - notify('Your subscription has been cancelled. Thank you for your support.') + const { subscription } = store.getState(); + if (subscription && sub.cancel_at_period_end) { + notify('Your subscription has been cancelled. Thank you for your support.'); } store.dispatch(actions.setSubscription(sub)); }