@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.
- package/lib/Round.js +10 -8
- 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
|
-
|
|
409
|
-
|
|
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
|
-
|
|
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
|
-
|
|
469
|
-
|
|
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
|
-
|
|
473
|
+
else {
|
|
474
|
+
return false;
|
|
475
|
+
}
|
|
474
476
|
|
|
475
477
|
}).reverse();
|
|
476
478
|
|