@dhyasama/totem-models 8.6.0 → 8.6.2

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/helpers.js CHANGED
@@ -81,7 +81,17 @@ const getPeopleSources = module.exports.getPeopleSources = function getPeopleSou
81
81
  if (!people) { return []; }
82
82
  if (!Array.isArray(people)) { return []; }
83
83
 
84
- let result = _.compact(_.pluck(people, 'sources'));
84
+ let result;
85
+
86
+ try {
87
+ result = _.compact(_.pluck(people, 'sources'));
88
+ }
89
+ catch(err) {
90
+ console.log(err);
91
+ console.log(people);
92
+ throw err;
93
+ }
94
+
85
95
  if (result.length === 0) { return []; }
86
96
 
87
97
  result = _.flatten(result);
package/lib/Round.js CHANGED
@@ -569,7 +569,7 @@ module.exports = function(mongoose, config) {
569
569
 
570
570
  _.each(rounds, function(round) {
571
571
  _.each(round.vehicles, function(vehicle) {
572
- if(vehicle.fund === fundId) {
572
+ if(vehicle.fund.toString() === fundId.toString()) {
573
573
  _.each(vehicle.investments, function(investment) {
574
574
  investment.organization = round.organization;
575
575
  investment.roundName = round.roundName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.6.0",
3
+ "version": "8.6.2",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",