diff --git a/src/Web/wwwroot/app/directives/passwordMeterDirective.js b/src/Web/wwwroot/app/directives/passwordMeterDirective.js
index 2d26adbbf70..d712ebe5309 100644
--- a/src/Web/wwwroot/app/directives/passwordMeterDirective.js
+++ b/src/Web/wwwroot/app/directives/passwordMeterDirective.js
@@ -3,7 +3,9 @@ angular
.directive('passwordMeter', function () {
return {
- template: '
',
+ template: '',
restrict: 'A',
scope: {
password: '=passwordMeter',
@@ -12,15 +14,15 @@ angular
},
link: function (scope) {
var measureStrength = function (username, password) {
- if (!password || password == username) {
+ if (!password || password === username) {
return 0;
}
var strength = password.length;
if (username && username !== '') {
- if (username.indexOf(password) != -1) strength -= 15;
- if (password.indexOf(username) != -1) strength -= username.length;
+ if (username.indexOf(password) !== -1) strength -= 15;
+ if (password.indexOf(username) !== -1) strength -= username.length;
}
if (password.length > 0 && password.length <= 4) strength += password.length;
@@ -47,7 +49,6 @@ angular
case 0:
case 1:
return 'danger';
-
case 2:
return 'warning';
case 3:
diff --git a/src/Web/wwwroot/app/directives/passwordViewerDirective.js b/src/Web/wwwroot/app/directives/passwordViewerDirective.js
index 5772b08d9a2..67f3626733b 100644
--- a/src/Web/wwwroot/app/directives/passwordViewerDirective.js
+++ b/src/Web/wwwroot/app/directives/passwordViewerDirective.js
@@ -13,11 +13,11 @@ angular
element.onclick = function (event) { };
element.on('click', function (event) {
var passwordElement = $(passwordViewer);
- if (passwordElement && passwordElement.attr('type') == 'password') {
+ if (passwordElement && passwordElement.attr('type') === 'password') {
element.removeClass('fa-eye').addClass('fa-eye-slash');
passwordElement.attr('type', 'text');
}
- else if (passwordElement && passwordElement.attr('type') == 'text') {
+ else if (passwordElement && passwordElement.attr('type') === 'text') {
element.removeClass('fa-eye-slash').addClass('fa-eye');
passwordElement.attr('type', 'password');
}
diff --git a/src/Web/wwwroot/app/services/authService.js b/src/Web/wwwroot/app/services/authService.js
index d34391f381e..ac00c7d29ee 100644
--- a/src/Web/wwwroot/app/services/authService.js
+++ b/src/Web/wwwroot/app/services/authService.js
@@ -75,7 +75,7 @@ angular
}
var decodedToken = jwtHelper.decodeToken(token);
- var twoFactor = decodedToken.authmethod == "TwoFactor";
+ var twoFactor = decodedToken.authmethod === "TwoFactor";
_userProfile = {
id: decodedToken.nameid,
diff --git a/src/Web/wwwroot/app/services/cryptoService.js b/src/Web/wwwroot/app/services/cryptoService.js
index c658ff8bb2f..364acfed654 100644
--- a/src/Web/wwwroot/app/services/cryptoService.js
+++ b/src/Web/wwwroot/app/services/cryptoService.js
@@ -99,7 +99,7 @@ angular
}
var encPieces = encValue.split('|');
- if (encPieces.length != 2) {
+ if (encPieces.length !== 2) {
return '';
}