Skip to content

Commit 56aa84a

Browse files
author
Vikas Agarwal
committed
Handling ‘’ empty string for bundlePeriod
1 parent 1da730b commit 56aa84a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

connect/notificationServices/email.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ function handler(topicName, messageJSON, notification) {
280280

281281
// if notifications has to be bundled
282282
let bundlePeriod = _.get(settings, `notifications['${notificationType}'].${SETTINGS_EMAIL_SERVICE_ID}.bundlePeriod`);
283+
bundlePeriod = bundlePeriod && bundlePeriod.trim().length > 0 ? bundlePeriod : null;
283284
// if bundling is not explicitly set and the event is not a messaging event, assume bundling enabled
284285
if (!bundlePeriod && !messagingEvent) {
285286
// if bundle period is not set, assume it to be daily for default case

0 commit comments

Comments
 (0)