Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit 80226a2

Browse files
committed
fix(client): lint issues for confirm() messages not referencing the window object
1 parent b0e6b4e commit 80226a2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

modules/articles/client/controllers/articles.client.controller.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
.module('articles')
66
.controller('ArticlesController', ArticlesController);
77

8-
ArticlesController.$inject = ['$scope', '$state', 'articleResolve', 'Authentication'];
8+
ArticlesController.$inject = ['$scope', '$state', 'articleResolve', '$window', 'Authentication'];
99

10-
function ArticlesController($scope, $state, article, Authentication) {
10+
function ArticlesController($scope, $state, article, $window, Authentication) {
1111
var vm = this;
1212

1313
vm.article = article;
@@ -19,7 +19,7 @@
1919

2020
// Remove existing Article
2121
function remove() {
22-
if (confirm('Are you sure you want to delete?')) {
22+
if ($window.confirm('Are you sure you want to delete?')) {
2323
vm.article.$remove($state.go('articles.list'));
2424
}
2525
}

modules/users/client/controllers/admin/user.client.controller.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
.module('users.admin')
66
.controller('UserController', UserController);
77

8-
UserController.$inject = ['$scope', '$state', 'Authentication', 'userResolve'];
8+
UserController.$inject = ['$scope', '$state', '$window', 'Authentication', 'userResolve'];
99

10-
function UserController($scope, $state, Authentication, user) {
10+
function UserController($scope, $state, $window, Authentication, user) {
1111
var vm = this;
1212

1313
vm.authentication = Authentication;
@@ -16,7 +16,7 @@
1616
vm.update = update;
1717

1818
function remove(user) {
19-
if (confirm('Are you sure you want to delete this user?')) {
19+
if ($window.confirm('Are you sure you want to delete this user?')) {
2020
if (user) {
2121
user.$remove();
2222

0 commit comments

Comments
 (0)