From 8fe70e38f2bc3dd38d4a04b58e0f59a7838297c7 Mon Sep 17 00:00:00 2001 From: vladikoff Date: Thu, 2 Feb 2017 15:50:17 -0800 Subject: [PATCH] wip2 --- lib/verification-reminders.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/verification-reminders.js b/lib/verification-reminders.js index a8ec990..091910b 100644 --- a/lib/verification-reminders.js +++ b/lib/verification-reminders.js @@ -63,9 +63,11 @@ module.exports = function (mailer, db, options) { .then( function (reminderResultsByType) { reminderResultsByType.forEach(function (reminders) { - reminders.forEach(function (reminder) { - self._processReminder(reminder) - }) + if (Array.isArray(reminders)) { + reminders.forEach(function (reminder) { + self._processReminder(reminder) + }) + } }) } ).catch(function (err) {