Skip to content

Commit db5bcef

Browse files
committed
return when not logged in
1 parent d36adb0 commit db5bcef

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/login/login.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,11 @@ export function newAppInstance (
10471047
* and/or a developer
10481048
*/
10491049
export async function getUserRoles (): Promise<Array<NamedNode>> {
1050+
const sessionInfo = authSession.info
1051+
if (!sessionInfo?.isLoggedIn || !sessionInfo?.webId) {
1052+
return []
1053+
}
1054+
10501055
const currentUser = authn.currentUser()
10511056
if (!currentUser) {
10521057
return []

0 commit comments

Comments
 (0)