diff --git a/src/Angular.js b/src/Angular.js index 8daf1e417140..3b824343a98c 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -1504,7 +1504,7 @@ function assertArgFn(arg, name, acceptArrayAnnotation) { } assertArg(isFunction(arg), name, 'not a function, got ' + - (arg && typeof arg == 'object' ? arg.constructor.name || 'Object' : typeof arg)); + (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg)); return arg; } diff --git a/src/auto/injector.js b/src/auto/injector.js index c8a8056d6ad6..12190fadd951 100644 --- a/src/auto/injector.js +++ b/src/auto/injector.js @@ -84,7 +84,7 @@ function annotate(fn, strictDi, name) { argDecl, last; - if (typeof fn == 'function') { + if (typeof fn === 'function') { if (!($inject = fn.$inject)) { $inject = []; if (fn.length) { diff --git a/src/ng/controller.js b/src/ng/controller.js index a4ca767e58b7..35353cd1e428 100644 --- a/src/ng/controller.js +++ b/src/ng/controller.js @@ -74,7 +74,7 @@ function $ControllerProvider() { instance = $injector.instantiate(expression, locals, constructor); if (identifier) { - if (!(locals && typeof locals.$scope == 'object')) { + if (!(locals && typeof locals.$scope === 'object')) { throw minErr('$controller')('noscp', "Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.", constructor || expression.name, identifier); diff --git a/src/ng/filter/filter.js b/src/ng/filter/filter.js index e662392d8dbf..9f0afeaa68b0 100644 --- a/src/ng/filter/filter.js +++ b/src/ng/filter/filter.js @@ -195,7 +195,7 @@ function filterFilter() { // jshint +W086 for (var key in expression) { (function(path) { - if (typeof expression[path] == 'undefined') return; + if (typeof expression[path] === 'undefined') return; predicates.push(function(value) { return search(path == '$' ? value : (value && value[path]), expression[path]); }); diff --git a/src/ng/rootScope.js b/src/ng/rootScope.js index 25a78ebabe02..8a61da2714bd 100644 --- a/src/ng/rootScope.js +++ b/src/ng/rootScope.js @@ -698,7 +698,7 @@ function $RootScopeProvider(){ if ((value = watch.get(current)) !== (last = watch.last) && !(watch.eq ? equals(value, last) - : (typeof value == 'number' && typeof last == 'number' + : (typeof value === 'number' && typeof last === 'number' && isNaN(value) && isNaN(last)))) { dirty = true; lastDirtyWatch = watch; diff --git a/src/ngScenario/Scenario.js b/src/ngScenario/Scenario.js index bafcba059455..6cf69d84ce79 100644 --- a/src/ngScenario/Scenario.js +++ b/src/ngScenario/Scenario.js @@ -294,7 +294,7 @@ _jQuery.fn.bindings = function(windowJquery, bindExp) { function push(value) { if (value === undefined) { value = ''; - } else if (typeof value != 'string') { + } else if (typeof value !== 'string') { value = angular.toJson(value); } result.push('' + value);