@dhyasama/totem-models 1.17.6 → 1.17.7

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.
@@ -493,6 +493,7 @@ module.exports = function(mongoose, config) {
493
493
 
494
494
  // Check if person is already added
495
495
  var match = _.find(self.people, function(existingPerson) {
496
+ if (existingPerson.person == null) return null;
496
497
  var id = utils.isValidObjectId(existingPerson.person) ? existingPerson.person : existingPerson.person.id;
497
498
  return id.toString() == personToAdd.person.toString();
498
499
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "1.17.6",
3
+ "version": "1.17.7",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",