Comparing version 0.6.10 to 0.6.11
@@ -121,12 +121,13 @@ 'use strict'; | ||
var resIdMap = {}; | ||
var initKeyparts = joinPath.split('.'); | ||
(0, _forEach2.default)(res, function (v) { | ||
return resIdMap[v._id] = v; | ||
}); | ||
var keyparts = joinPath.split('.'); | ||
var field = keyparts[keyparts.length - 1]; | ||
(0, _forEach2.default)(docsWrapped, function (wrap) { | ||
(0, _forEach2.default)(wrap.lookupResult, function (branch) { | ||
if (branch.value) { | ||
// `findModTarget` will modify `keyparts`. So, it should | ||
// be copied each time. | ||
var keyparts = initKeyparts.slice(); | ||
var target = (0, _DocumentModifier.findModTarget)(wrap.doc, keyparts, { | ||
@@ -137,2 +138,3 @@ noCreate: false, | ||
}); | ||
var field = keyparts[keyparts.length - 1]; | ||
@@ -139,0 +141,0 @@ if (_checkTypes2.default.array(branch.value)) { |
@@ -255,3 +255,2 @@ 'use strict'; | ||
exports.default = Random; | ||
exports.default = Random; |
@@ -78,10 +78,11 @@ import _check from 'check-types'; | ||
const resIdMap = {}; | ||
const initKeyparts = joinPath.split('.'); | ||
_each(res, v => resIdMap[v._id] = v); | ||
const keyparts = joinPath.split('.'); | ||
const field = keyparts[keyparts.length - 1]; | ||
_each(docsWrapped, wrap => { | ||
_each(wrap.lookupResult, branch => { | ||
if (branch.value) { | ||
// `findModTarget` will modify `keyparts`. So, it should | ||
// be copied each time. | ||
const keyparts = initKeyparts.slice(); | ||
const target = findModTarget(wrap.doc, keyparts, { | ||
@@ -92,2 +93,3 @@ noCreate: false, | ||
}); | ||
const field = keyparts[keyparts.length - 1]; | ||
@@ -94,0 +96,0 @@ if (_check.array(branch.value)) { |
@@ -35,3 +35,3 @@ import _each from 'fast.js/forEach'; | ||
BasicCursor.prototype[procName] = v.method; | ||
}); | ||
});n | ||
@@ -38,0 +38,0 @@ |
@@ -243,3 +243,1 @@ import _try from 'fast.js/function/try'; | ||
} | ||
export default Random; |
{ | ||
"name": "marsdb", | ||
"version": "0.6.10", | ||
"version": "0.6.11", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "Artem Artemev", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1025168
23539