登录:初始登录onEntryData添加try catch
This commit is contained in:
@@ -105,6 +105,7 @@ export async function pushData(hasInit: boolean, role: RoleType, session: Fronte
|
||||
}
|
||||
|
||||
export async function getModuleData(type: string, data: { role: RoleType, session: FrontendOrBackendSession }, guildData: { hasGuild: boolean, guild?: GuildType, userGuild?: UserGuildType, guildResult?: any } = { hasGuild: false }) {
|
||||
try {
|
||||
let { role, session } = data;
|
||||
const { roleId, serverId, roleName, guildCode } = role;
|
||||
let { hasGuild, guild, userGuild, guildResult } = guildData;
|
||||
@@ -208,6 +209,10 @@ export async function getModuleData(type: string, data: { role: RoleType, sessio
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e.stack);
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
function pushEntryData<T>(type: string, roleId: string, sid: string, param: T) {
|
||||
|
||||
Reference in New Issue
Block a user