fix: skip updateState if history if empty (#81)
parent
5867740de3
commit
417a52138d
|
|
@ -347,6 +347,10 @@ export class RankTracker {
|
||||||
async updateState(
|
async updateState(
|
||||||
history: HistoryGroups<BattleListNode>["nodes"],
|
history: HistoryGroups<BattleListNode>["nodes"],
|
||||||
) {
|
) {
|
||||||
|
if (history.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// history order by time. 0 is the oldest.
|
// history order by time. 0 is the oldest.
|
||||||
const flatten: FlattenItem[] = await Promise.all(
|
const flatten: FlattenItem[] = await Promise.all(
|
||||||
history
|
history
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue