mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge branch 'devel' into release-1.6
This commit is contained in:
@@ -80,7 +80,7 @@ const handleError = (msg, throwError = true) => {
|
||||
const error = new Meteor.Error(
|
||||
403,
|
||||
Accounts._options.ambiguousErrorMessages
|
||||
? "Login failure. Please check your login credentials."
|
||||
? "Something went wrong. Please check your credentials."
|
||||
: msg
|
||||
);
|
||||
if (throwError) {
|
||||
|
||||
@@ -777,8 +777,8 @@ function getValueBitmask(value, length) {
|
||||
function insertIntoDocument(document, key, value) {
|
||||
Object.keys(document).forEach(existingKey => {
|
||||
if (
|
||||
(existingKey.length > key.length && existingKey.indexOf(key) === 0) ||
|
||||
(key.length > existingKey.length && key.indexOf(existingKey) === 0)
|
||||
(existingKey.length > key.length && existingKey.indexOf(`${key}.`) === 0) ||
|
||||
(key.length > existingKey.length && key.indexOf(`${existingKey}.`) === 0)
|
||||
) {
|
||||
throw new Error(
|
||||
`cannot infer query fields to set, both paths '${existingKey}' and ` +
|
||||
|
||||
@@ -3006,7 +3006,10 @@ Tinytest.add('minimongo - modify', test => {
|
||||
upsert({"_id": "foo", "foo": "bar"}, {"bar": "foo"}, {"_id": "foo", "bar": "foo"})
|
||||
// Replacement update keeps _id
|
||||
upsertUpdate({"_id": "foo", "bar": "baz"}, {"_id":"foo"}, {"bar": "crow"}, {"_id": "foo", "bar": "crow"});
|
||||
|
||||
// Test for https://github.com/meteor/meteor/issues/9167
|
||||
upsert({key: 123, keyName: '321'}, {$set: {name: 'Todo'}}, {key: 123, keyName: '321', name: 'Todo'});
|
||||
upsertException({key: 123, "key.name": '321'}, {$set:{}});
|
||||
|
||||
// Nested fields don't work with literal objects
|
||||
upsertException({"a": {}, "a.b": "foo"}, {});
|
||||
// You can't have an ambiguious ID
|
||||
|
||||
Reference in New Issue
Block a user