== to ===
This commit is contained in:
@@ -88,7 +88,7 @@ export class CalendarUnit extends Laya.Script {
|
||||
}
|
||||
|
||||
updateUnit(): void {
|
||||
if (this.open == false) {
|
||||
if (this.open === false) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -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++
|
||||
|
||||
@@ -20,7 +20,7 @@ export class TrophyClaim extends Laya.Script {
|
||||
public onSetShow(record: TrophyRecord): void {
|
||||
for (let i = 0; i < MONTH_LIST.length; i++) {
|
||||
const obj = MONTH_LIST[i]
|
||||
if (obj.year == record.year && obj.month == record.month) {
|
||||
if (obj.year === record.year && obj.month === record.month) {
|
||||
this.icon.skin = obj.icon_res
|
||||
break
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ export class TrophyRoom extends Laya.Script {
|
||||
for (var i = 0; i < MONTH_LIST.length; i++) {
|
||||
var obj = MONTH_LIST[i]
|
||||
infos.push(obj)
|
||||
if (obj.year == nowYear && obj.month == nowMonth) {
|
||||
if (obj.year === nowYear && obj.month === nowMonth) {
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@ export class TrophyRoom extends Laya.Script {
|
||||
if (find < 0) {
|
||||
years.push(obj.year)
|
||||
}
|
||||
if (monthMap.has(obj.year) == false) {
|
||||
if (monthMap.has(obj.year) === false) {
|
||||
monthMap.set(obj.year, [])
|
||||
}
|
||||
const list = monthMap.get(obj.year)
|
||||
|
||||
@@ -20,7 +20,7 @@ export class TrophyShow extends Laya.Script {
|
||||
public onSetShow(record: TrophyRecord): void {
|
||||
for (let i = 0; i < MONTH_LIST.length; i++) {
|
||||
const obj = MONTH_LIST[i]
|
||||
if (obj.year == record.year && obj.month == record.month) {
|
||||
if (obj.year === record.year && obj.month === record.month) {
|
||||
this.icon.skin = obj.icon_res
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user