Skip to content

Commit ef11d5b

Browse files
committed
style(service): fix eslint warnings in auth.service.js
1 parent f5bd23b commit ef11d5b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: templates/app/client/components/auth(auth)/auth.service.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/*global _*/
12
'use strict';
23
// @flow
34
class _User {
@@ -185,9 +186,8 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use
185186
* @param {Function|*} callback - optional, function(is)
186187
* @return {Bool|Promise}
187188
*/
188-
isAdmin() {
189-
return Auth.hasRole
190-
.apply(Auth, [].concat.apply(['admin'], arguments));
189+
isAdmin(...args) {
190+
return Auth.hasRole(...Reflect.apply([].concat, ['admin'], args));
191191
},
192192

193193
/**
@@ -196,6 +196,7 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use
196196
* @return {Bool}
197197
*/
198198
isAdminSync() {
199+
// eslint-disable-next-line no-sync
199200
return Auth.hasRoleSync('admin');
200201
},
201202

0 commit comments

Comments
 (0)