fix: skip updateState if history if empty (#81)

dumb-splashcat-thing^2
spacemeowx2 2023-07-17 15:33:32 +08:00
parent 5867740de3
commit 417a52138d
1 changed files with 4 additions and 0 deletions

View File

@ -347,6 +347,10 @@ export class RankTracker {
async updateState(
history: HistoryGroups<BattleListNode>["nodes"],
) {
if (history.length === 0) {
return;
}
// history order by time. 0 is the oldest.
const flatten: FlattenItem[] = await Promise.all(
history