判空问题
This commit is contained in:
@@ -31,7 +31,7 @@ export class UIManager extends Laya.Script {
|
|||||||
|
|
||||||
private UIRoot: Laya.Panel
|
private UIRoot: Laya.Panel
|
||||||
public getUIRoot(): Laya.Node {
|
public getUIRoot(): Laya.Node {
|
||||||
if (this.UIRoot == null) {
|
if (!this.UIRoot) {
|
||||||
this.UIRoot = this.owner.getChildByName("UIRoot") as Laya.Panel
|
this.UIRoot = this.owner.getChildByName("UIRoot") as Laya.Panel
|
||||||
if (config.H_SCREEN) {
|
if (config.H_SCREEN) {
|
||||||
this.UIRoot.width = config.DESIGN_HEIGHT
|
this.UIRoot.width = config.DESIGN_HEIGHT
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ export class DailyChallenge extends Laya.Script {
|
|||||||
unit.label_show.visible = false
|
unit.label_show.visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.selectedUnit == null)
|
if (!this.selectedUnit)
|
||||||
this.selectedUnit = this.units[info.begin+info.dayCount-1]
|
this.selectedUnit = this.units[info.begin+info.dayCount-1]
|
||||||
this.onApplyUnit(this.selectedUnit)
|
this.onApplyUnit(this.selectedUnit)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user