@dhyasama/totem-models 5.1.1 → 5.1.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/lib/Organization.js +2 -1
- package/package.json +1 -1
package/lib/Organization.js
CHANGED
|
@@ -584,7 +584,8 @@ module.exports = function(mongoose, config) {
|
|
|
584
584
|
|
|
585
585
|
// Check if this deal already exists
|
|
586
586
|
var dealMatch = _.find(self.deals, function(d) {
|
|
587
|
-
|
|
587
|
+
var did = d._id ? d._id.toString() : d;
|
|
588
|
+
return did === deal._id.toString();
|
|
588
589
|
});
|
|
589
590
|
|
|
590
591
|
// Update the deal
|