Skip to content

Commit e2ebd97

Browse files
author
Pooya Parsa
committed
fix: fix scope checks during logout
1 parent b58ca17 commit e2ebd97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/templates/auth.class.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ export default class Auth {
330330
this.ctx.redirect(to)
331331
}
332332

333-
hasScope (scope) {
334-
const userScopes = getProp(this.state.user, this.options.scopeKey)
333+
hasScope(scope) {
334+
const userScopes = this.state.user && getProp(this.state.user, this.options.scopeKey)
335335

336336
if (!userScopes) {
337337
return

0 commit comments

Comments
 (0)