fix: replace kernelLoadedResolve with kernelLoadedDefer

This commit is contained in:
Derrick Hammer 2023-09-11 06:52:58 -04:00
parent 1138e45486
commit b5d3ba46cf
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 3 deletions

View File

@ -229,9 +229,9 @@ function handleMessage(event: MessageEvent) {
if (!kernelLoadedResolved && event.data.data.kernelLoaded !== "not yet") {
kernelLoadedResolved = true;
if (event.data.data.kernelLoaded === "success") {
kernelLoadedResolve(null);
kernelLoadedDefer.resolve(null);
} else {
kernelLoadedResolve(event.data.data.kernelLoaded);
kernelLoadedDefer.resolve(event.data.data.kernelLoaded);
}
}
@ -414,7 +414,6 @@ let initDefer: DeferredPromise<void>;
let loginResolved = false; // set to true once we know the user is logged in
let loginDefer: DeferredPromise<void>;
let kernelLoadedResolved = false; // set to true once the user kernel is loaded
let kernelLoadedResolve: (err: Err) => void;
let kernelLoadedDefer: DeferredPromise<Err>;
const logoutResolved = false; // set to true once the user is logged out
let logoutDefer: DeferredPromise<void>;