refactor: add getLoggedInDefer calls to kernelAuthStatus check
This commit is contained in:
parent
2fd4a3be71
commit
56e0181c37
|
@ -6,11 +6,13 @@ import {
|
|||
getAuthStatusDefer,
|
||||
getAuthStatusKnown,
|
||||
getKernelIframe,
|
||||
getLoggedInDefer,
|
||||
getOpenPorts,
|
||||
getQueries,
|
||||
getQueriesNonce,
|
||||
getQuery,
|
||||
increaseQueriesNonce,
|
||||
resetLoggedInDefer,
|
||||
setAuthStatus,
|
||||
setAuthStatusKnown,
|
||||
} from "../../vars.js";
|
||||
|
@ -49,6 +51,11 @@ export function handleKernelMessage(event: MessageEvent) {
|
|||
console.log("bootloader is now initialized");
|
||||
if (!getAuthStatus().loginComplete) {
|
||||
console.log("user is not logged in: waiting until login is confirmed");
|
||||
} else {
|
||||
getLoggedInDefer().resolve();
|
||||
}
|
||||
if (getAuthStatus().logoutComplete) {
|
||||
resetLoggedInDefer();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue