Skip to content

Commit db3ce92

Browse files
committed
fix(client:auth): fix isLoggedIn for TS
1 parent 6e3cdc8 commit db3ce92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export class AuthService {
164164
* @returns {Promise}
165165
*/
166166
isLoggedIn(callback) {
167-
let is = this.currentUser.hasOwnProperty('role');
167+
let is = !!this.currentUser._id;
168168
safeCb(callback)(is);
169169
return Promise.resolve(is);
170170
}
@@ -174,7 +174,7 @@ export class AuthService {
174174
* @returns {Boolean}
175175
*/
176176
isLoggedInSync() {
177-
return this.currentUser.hasOwnProperty('role');
177+
return !!this.currentUser._id;
178178
}
179179

180180
/**

0 commit comments

Comments
 (0)