web: fix title not being loaded from config
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> #770
This commit is contained in:
		| @ -1,10 +1,10 @@ | ||||
| import { CoreApi, SessionUser } from "authentik-api"; | ||||
| import { DEFAULT_CONFIG } from "./Config"; | ||||
|  | ||||
| let _globalMePromise: Promise<SessionUser>; | ||||
| let globalMePromise: Promise<SessionUser>; | ||||
| export function me(): Promise<SessionUser> { | ||||
|     if (!_globalMePromise) { | ||||
|         _globalMePromise = new CoreApi(DEFAULT_CONFIG).coreUsersMe().catch((ex) => { | ||||
|     if (!globalMePromise) { | ||||
|         globalMePromise = new CoreApi(DEFAULT_CONFIG).coreUsersMe().catch((ex) => { | ||||
|             const defaultUser: SessionUser = { | ||||
|                 user: { | ||||
|                     username: "", | ||||
| @ -17,5 +17,5 @@ export function me(): Promise<SessionUser> { | ||||
|             return defaultUser; | ||||
|         }); | ||||
|     } | ||||
|     return _globalMePromise; | ||||
|     return globalMePromise; | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer