@dhyasama/totem-models 1.25.3 → 1.25.4

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.
@@ -217,7 +217,8 @@ module.exports = function(mongoose, config) {
217
217
  if (result.length == 0) return [];
218
218
  if (mongoose.Types.ObjectId.isValid(result[0].person)) return []; // not populated
219
219
 
220
- result = _.uniq(result, function(item) { return item.person._id.toString(); });
220
+ result = _.uniq(result, function(item) { return item.person._id ? item.person._id.toString() : ''; });
221
+ result = _.compact(result);
221
222
  result = _.sortBy(result, 'interactions.count');
222
223
  result.reverse();
223
224
  result = _.sortBy(result, 'name.full');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "1.25.3",
3
+ "version": "1.25.4",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",