Normalized strings.

This commit is contained in:
Radosław Miernik
2017-07-13 21:14:26 +02:00
parent a082de950a
commit f5b0de5417
2 changed files with 3 additions and 3 deletions

View File

@@ -308,7 +308,7 @@ const VALUE_OPERATORS = {
},
$near(operand, valueSelector, matcher, isRoot) {
if (!isRoot)
throw Error("$near can't be inside another $ operator");
throw Error('$near can\'t be inside another $ operator');
matcher._hasGeoQuery = true;
@@ -549,7 +549,7 @@ function distanceCoordinatePairs(a, b) {
// for equality with that thing.
export function equalityElementMatcher(elementSelector) {
if (isOperatorObject(elementSelector))
throw Error("Can't create equalityValueSelector for operator object");
throw Error('Can\'t create equalityValueSelector for operator object');
// Special-case: null and undefined are equal (if you got undefined in there
// somewhere, or if you got it due to some branch being non-existent in the

View File

@@ -717,7 +717,7 @@ LocalCollection.wrapTransform = transform => {
if (transformed.hasOwnProperty('_id')) {
if (!EJSON.equals(transformed._id, id))
throw new Error("transformed document can't have different _id");
throw new Error('transformed document can\'t have different _id');
} else {
transformed._id = id;
}