fix: function does not need to be async
This commit is contained in:
parent
4b8240bcd5
commit
09b691ce0f
|
@ -28,7 +28,7 @@ export function getNetworkModuleStatus(
|
||||||
module?: string,
|
module?: string,
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
CM: connectModuleBound = connectModule.bind(null, module),
|
CM: connectModuleBound = connectModule.bind(null, module),
|
||||||
): Promise<void> | (() => Promise<void>) {
|
): Promise<void> | (() => void) {
|
||||||
let recvUpdate = (data) => {
|
let recvUpdate = (data) => {
|
||||||
callback?.(data);
|
callback?.(data);
|
||||||
};
|
};
|
||||||
|
@ -52,7 +52,7 @@ export function getNetworkModuleStatus(
|
||||||
|
|
||||||
let closed = false;
|
let closed = false;
|
||||||
|
|
||||||
return async () => {
|
return () => {
|
||||||
if (closed) {
|
if (closed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue