fix: replace kernelLoadedResolve with kernelLoadedDefer
This commit is contained in:
parent
1138e45486
commit
b5d3ba46cf
|
@ -229,9 +229,9 @@ function handleMessage(event: MessageEvent) {
|
||||||
if (!kernelLoadedResolved && event.data.data.kernelLoaded !== "not yet") {
|
if (!kernelLoadedResolved && event.data.data.kernelLoaded !== "not yet") {
|
||||||
kernelLoadedResolved = true;
|
kernelLoadedResolved = true;
|
||||||
if (event.data.data.kernelLoaded === "success") {
|
if (event.data.data.kernelLoaded === "success") {
|
||||||
kernelLoadedResolve(null);
|
kernelLoadedDefer.resolve(null);
|
||||||
} else {
|
} 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 loginResolved = false; // set to true once we know the user is logged in
|
||||||
let loginDefer: DeferredPromise<void>;
|
let loginDefer: DeferredPromise<void>;
|
||||||
let kernelLoadedResolved = false; // set to true once the user kernel is loaded
|
let kernelLoadedResolved = false; // set to true once the user kernel is loaded
|
||||||
let kernelLoadedResolve: (err: Err) => void;
|
|
||||||
let kernelLoadedDefer: DeferredPromise<Err>;
|
let kernelLoadedDefer: DeferredPromise<Err>;
|
||||||
const logoutResolved = false; // set to true once the user is logged out
|
const logoutResolved = false; // set to true once the user is logged out
|
||||||
let logoutDefer: DeferredPromise<void>;
|
let logoutDefer: DeferredPromise<void>;
|
||||||
|
|
Loading…
Reference in New Issue