判空问题

This commit is contained in:
2025-05-28 17:00:47 +08:00
parent 6e850ff6a9
commit 367d40d4b0
2 changed files with 2 additions and 2 deletions

View File

@@ -231,7 +231,7 @@ export class DailyChallenge extends Laya.Script {
unit.label_show.visible = false
}
}
if (this.selectedUnit == null)
if (!this.selectedUnit)
this.selectedUnit = this.units[info.begin+info.dayCount-1]
this.onApplyUnit(this.selectedUnit)
}