RN-147 Properly handle Account Notifications when Email Batching is enabled (#578)

This commit is contained in:
enahum 2017-05-29 14:46:08 -04:00 committed by GitHub
parent febc818bbb
commit f6266c10c5

View file

@ -120,7 +120,9 @@ class AccountNotifications extends PureComponent {
let interval;
if (this.props.config.EnableEmailBatching === 'true') {
const emailPreferences = getPreferencesByCategory(this.props.myPreferences, Preferences.CATEGORY_NOTIFICATIONS);
interval = emailPreferences.get(Preferences.EMAIL_INTERVAL).value;
if (emailPreferences.size) {
interval = emailPreferences.get(Preferences.EMAIL_INTERVAL).value;
}
}
const comments = notifyProps.comments || 'never';