@dhyasama/totem-merge 7.0.1 → 7.0.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/organizations.js +2 -2
- package/package.json +1 -1
package/lib/organizations.js
CHANGED
|
@@ -81,11 +81,11 @@ var merge = function merge(context, target, source, mergedBy, customerId, cb) {
|
|
|
81
81
|
var updatedTarget = results[5];
|
|
82
82
|
|
|
83
83
|
// result from updateOrganizations within updateReferences
|
|
84
|
-
var updatedReferencesOrgs = results[6][
|
|
84
|
+
var updatedReferencesOrgs = results[6][5];
|
|
85
85
|
|
|
86
86
|
// Check if target had reference(s) updated
|
|
87
87
|
var targetMatch = _.find(updatedReferencesOrgs, function(o) {
|
|
88
|
-
return o.id.toString() === target.id.toString();
|
|
88
|
+
return o && o.id && o.id.toString() === target.id.toString();
|
|
89
89
|
});
|
|
90
90
|
|
|
91
91
|
// Return up to date target
|