@dhyasama/totem-models 8.82.0 → 8.82.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Financials.js CHANGED
@@ -321,8 +321,8 @@ module.exports = function(mongoose, config) {
321
321
 
322
322
  _.each(financial.snapshots, function(snapshot) {
323
323
 
324
- var hasSendTo = snapshot.notifications.company.sendTo.length > 0;
325
- var hasSendOnLessThanNow = snapshot.notifications.company.initial.sendOn < now;
324
+ var hasSendTo = snapshot.notifications.company.sendTo && snapshot.notifications.company.sendTo.length > 0;
325
+ var hasSendOnLessThanNow = snapshot.notifications.company.initial.sendOn && snapshot.notifications.company.initial.sendOn < now;
326
326
  var hasSentOn = snapshot.notifications.company.initial.sentOn;
327
327
  var hasSentToQueue = snapshot.notifications.company.initial.sentToQueue;
328
328
 
@@ -388,8 +388,8 @@ module.exports = function(mongoose, config) {
388
388
  _.each(financial.snapshots, function(snapshot) {
389
389
 
390
390
  var conditions = _.some(snapshot.notifications.company.reminders, function(reminder) {
391
- var hasSendTo = snapshot.notifications.company.sendTo.length > 0;
392
- var hasSendOnLessThanNow = reminder.sendOn < now;
391
+ var hasSendTo = snapshot.notifications.company.sendTo && snapshot.notifications.company.sendTo.length > 0;
392
+ var hasSendOnLessThanNow = reminder.sendOn && reminder.sendOn < now;
393
393
  var hasSentOn = reminder.sentOn;
394
394
  var hasSentToQueue = reminder.sentToQueue;
395
395
  var hasBeenSubmitted = snapshot.submittedOn;
@@ -450,8 +450,8 @@ module.exports = function(mongoose, config) {
450
450
  _.each(financial.snapshots, function(snapshot) {
451
451
 
452
452
  var conditions = _.some(snapshot.notifications.company.rejections, function(rejection) {
453
- var hasSendTo = snapshot.notifications.company.sendTo.length > 0;
454
- var hasSendOnLessThanNow = rejection.sendOn < now;
453
+ var hasSendTo = snapshot.notifications.company.sendTo && snapshot.notifications.company.sendTo.length > 0;
454
+ var hasSendOnLessThanNow = rejection.sendOn && rejection.sendOn < now;
455
455
  var hasSentOn = rejection.sentOn;
456
456
  var hasSentToQueue = rejection.sentToQueue;
457
457
  var hasBeenSubmitted = snapshot.submittedOn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.82.0",
3
+ "version": "8.82.1",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",