Skip to content

Commit d6eaefa

Browse files
thameeraluisrudge
authored andcommitted
Fix blank screen when scopes not already defined (#42)
1 parent 646aa63 commit d6eaefa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

04-Authorization/src/Auth/Auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default class Auth {
9898
}
9999

100100
userHasScopes(scopes) {
101-
const grantedScopes = JSON.parse(localStorage.getItem('scopes')).split(' ');
101+
const grantedScopes = (JSON.parse(localStorage.getItem('scopes')) || '').split(' ');
102102
return scopes.every(scope => grantedScopes.includes(scope));
103103
}
104104
}

0 commit comments

Comments
 (0)