mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fixed failing test.
This commit is contained in:
@@ -1034,8 +1034,6 @@ LocalCollection._modify = (doc, modifier, options = {}) => {
|
||||
if (!keyparts.every(Boolean))
|
||||
throw MinimongoError(`The update path '${keypath}' contains an empty field name, which is not allowed.`);
|
||||
|
||||
const noCreate = NO_CREATE_MODIFIERS.hasOwnProperty(operator);
|
||||
const forbidArray = operator === '$rename';
|
||||
const target = findModTarget(newDoc, keyparts, {
|
||||
arrayIndices: options.arrayIndices,
|
||||
forbidArray: operator === '$rename',
|
||||
@@ -1214,7 +1212,7 @@ LocalCollection._selectorIsIdPerhapsAsObject = selector => {
|
||||
if (LocalCollection._selectorIsId(selector))
|
||||
return true;
|
||||
|
||||
return LocalCollection._selectorIsId(selector && selector._id);
|
||||
return LocalCollection._selectorIsId(selector && selector._id) && Object.keys(selector).length === 1;
|
||||
};
|
||||
|
||||
LocalCollection._updateInResults = (query, doc, old_doc) => {
|
||||
|
||||
Reference in New Issue
Block a user