Przeglądaj źródła

EAGLESIX-2651: Expression: fix minor style issues

Kyle P Davis 11 lat temu
rodzic
commit
cff1201ede
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      lib/pipeline/expressions/Expression.js

+ 2 - 2
lib/pipeline/expressions/Expression.js

@@ -45,7 +45,7 @@ var ObjectCtx = Expression.ObjectCtx = (function() {
 	 *      @param [opts.isInclusionOk]     {Boolean}
 	 */
 	var klass = function ObjectCtx(opts /*= {isDocumentOk:..., isTopLevel:..., isInclusionOk:...}*/ ) {
-		if (!(opts instanceof Object && opts.constructor == Object)) throw new Error("opts is required and must be an Object containing named args");
+		if (!(opts instanceof Object && opts.constructor === Object)) throw new Error("opts is required and must be an Object containing named args");
 		for (var k in opts) { // assign all given opts to self so long as they were part of klass.prototype as undefined properties
 			if (opts.hasOwnProperty(k) && proto.hasOwnProperty(k) && proto[k] === undefined) this[k] = opts[k];
 		}
@@ -317,7 +317,7 @@ proto.evaluate = function evaluate(vars) {
  * @returns the field path with the prefix removed
  */
 klass.removeFieldPrefix = function removeFieldPrefix(prefixedField) {
-	if (prefixedField.indexOf("\0") != -1) throw new Error("field path must not contain embedded null characters; uassert code 16419");
+	if (prefixedField.indexOf("\0") !== -1) throw new Error("field path must not contain embedded null characters; uassert code 16419");
 	if (prefixedField[0] !== "$") throw new Error("field path references must be prefixed with a '$' ('" + prefixedField + "'); uassert code 15982");
 	return prefixedField.substr(1);
 };