🐞 fix(判空): 根据后台错误日志添加空值判断

This commit is contained in:
luying
2023-05-13 19:49:35 +08:00
parent 7bebb83140
commit a7fa3cfb5c
8 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -1331,7 +1331,7 @@ export async function getRankInHandler(redisKey: REDIS_KEY, type: RANK_TYPE, key
} else if (type == RANK_TYPE.GUILD_LV) {
if(role.hasGuild) {
let guild = await GuildModel.findByCode(guildCode, serverId);
myRank = await r.generMyRankWithGuild2(roleId, guild.lv, guild.activeWeekly, guild.lvUpdateTime, guild);
if(guild) myRank = await r.generMyRankWithGuild2(roleId, guild.lv, guild.activeWeekly, guild.lvUpdateTime, guild);
}
} else if (type == RANK_TYPE.GUILD_FUND) {
if(role.hasGuild) {