Skip to content

Commit

Permalink
Merge pull request #5381 from Countly/nletter
Browse files Browse the repository at this point in the history
Update newsletter check
  • Loading branch information
kanwarujjaval committed Jul 4, 2024
2 parents 0c4d0f3 + 9f57cb8 commit d281cc6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
app.navigate("/not-responded-consent", true);
}
}
else if (hasNewsLetter && (!countlyGlobal.member.subscribe_newsletter && !store.get('disable_newsletter_prompt') && (countlyGlobal.member.login_count === 3 || moment().dayOfYear() % 90 === 0))) {
else if (hasNewsLetter && (typeof countlyGlobal.member.subscribe_newsletter !== 'boolean' && !store.get('disable_newsletter_prompt') && (countlyGlobal.member.login_count === 3 || moment().dayOfYear() % 90 === 0))) {
if (Backbone.history.fragment !== '/not-subscribed-newsletter' && !/initial-setup|initial-consent/.test(window.location.hash)) {
app.navigate("/not-subscribed-newsletter", true);
}
Expand Down

0 comments on commit d281cc6

Please sign in to comment.