mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-08 00:47:15 +08:00
adjust sequence of hooks.userInfoResponse?.promise(userInfoResponse) - regardless whether it's error or not
This commit is contained in:
@@ -113,6 +113,7 @@ export async function mainLoop (hooks) {
|
|||||||
hooks.pageLoaded?.call()
|
hooks.pageLoaded?.call()
|
||||||
|
|
||||||
let userInfoResponse = await userInfoPromise
|
let userInfoResponse = await userInfoPromise
|
||||||
|
await hooks.userInfoResponse?.promise(userInfoResponse)
|
||||||
if (userInfoResponse.code !== 0) {
|
if (userInfoResponse.code !== 0) {
|
||||||
autoStartChatEventBus.emit('LOGIN_STATUS_INVALID', {
|
autoStartChatEventBus.emit('LOGIN_STATUS_INVALID', {
|
||||||
userInfoResponse
|
userInfoResponse
|
||||||
@@ -121,7 +122,6 @@ export async function mainLoop (hooks) {
|
|||||||
throw new Error("LOGIN_STATUS_INVALID")
|
throw new Error("LOGIN_STATUS_INVALID")
|
||||||
} else {
|
} else {
|
||||||
await storeStorage(page).catch(() => void 0)
|
await storeStorage(page).catch(() => void 0)
|
||||||
await hooks.userInfoResponse?.promise(userInfoResponse)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// check set security question tip modal
|
// check set security question tip modal
|
||||||
|
|||||||
Reference in New Issue
Block a user