== to ===
This commit is contained in:
@@ -131,7 +131,7 @@ export class DailyChallenge extends Laya.Script {
|
||||
const nowMonth = now.getMonth() + 1
|
||||
for (var i = 0; i < MONTH_LIST.length; i++) {
|
||||
const obj = MONTH_LIST[i]
|
||||
if (nowYear == obj.year && nowMonth == obj.month) {
|
||||
if (nowYear === obj.year && nowMonth === obj.month) {
|
||||
this.indexMax = i
|
||||
break
|
||||
}
|
||||
@@ -169,7 +169,7 @@ export class DailyChallenge extends Laya.Script {
|
||||
this.currentIndex = 0
|
||||
for (let i = 0; i < MONTH_LIST.length; i++) {
|
||||
const obj = MONTH_LIST[i]
|
||||
if (nowYear == obj.year && nowMonth == obj.month) {
|
||||
if (nowYear === obj.year && nowMonth === obj.month) {
|
||||
this.currentIndex = i
|
||||
break
|
||||
}
|
||||
@@ -212,10 +212,10 @@ export class DailyChallenge extends Laya.Script {
|
||||
let open = true
|
||||
if (info.year > nowYear) {
|
||||
open = false
|
||||
} else if (info.year == nowYear) {
|
||||
} else if (info.year === nowYear) {
|
||||
if (info.month > nowMonth) {
|
||||
open = false
|
||||
} else if (info.month == nowMonth) {
|
||||
} else if (info.month === nowMonth) {
|
||||
if (day > nowDay) {
|
||||
open = false
|
||||
}
|
||||
@@ -234,7 +234,7 @@ export class DailyChallenge extends Laya.Script {
|
||||
}
|
||||
}
|
||||
unit.setCalendarUnit(info.year, info.month, day, open, progress, this, this.onClickUnit)
|
||||
if (info.year == nowYear && info.month == nowMonth && day == nowDay) {
|
||||
if (info.year === nowYear && info.month === nowMonth && day === nowDay) {
|
||||
this.selectedUnit = unit
|
||||
}
|
||||
day++
|
||||
|
||||
Reference in New Issue
Block a user