@dhyasama/totem-models 8.47.0 → 8.47.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.
Files changed (2) hide show
  1. package/lib/Round.js +10 -8
  2. package/package.json +1 -1
package/lib/Round.js CHANGED
@@ -405,12 +405,13 @@ module.exports = function(mongoose, config) {
405
405
  // reverse chronological
406
406
  rounds = _.sortBy(rounds, function(r) {
407
407
 
408
- // use investment date in absence of closing date
409
- if (!date && r.vehicles.length && r.vehicles[0].investments.length) {
410
- date = r.vehicles[0].investments[0].date;
408
+ if (r.vehicles.length && r.vehicles[0].investments.length) {
409
+ return r.vehicles[0].investments[0].date;
411
410
  }
412
411
 
413
- return date;
412
+ else {
413
+ return false;
414
+ }
414
415
 
415
416
  }).reverse();
416
417
 
@@ -465,12 +466,13 @@ module.exports = function(mongoose, config) {
465
466
  // reverse chronological
466
467
  rounds = _.sortBy(rounds, function(r) {
467
468
 
468
- // use investment date in absence of closing date
469
- if (!date && r.vehicles.length && r.vehicles[0].investments.length) {
470
- date = r.vehicles[0].investments[0].date;
469
+ if (r.vehicles.length && r.vehicles[0].investments.length) {
470
+ return r.vehicles[0].investments[0].date;
471
471
  }
472
472
 
473
- return date;
473
+ else {
474
+ return false;
475
+ }
474
476
 
475
477
  }).reverse();
476
478
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.47.0",
3
+ "version": "8.47.1",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",