mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 07:22:19 +02:00
Fixed conditional statement to ensure robustness in live environments to avoid potential issues in production
This commit is contained in:
parent
848cc1d23f
commit
61b40ac972
@ -83,7 +83,7 @@ export abstract class ModalUiHandler extends UiHandler {
|
|||||||
show(args: any[]): boolean {
|
show(args: any[]): boolean {
|
||||||
if (args.length >= 1 && "buttonActions" in args[0]) {
|
if (args.length >= 1 && "buttonActions" in args[0]) {
|
||||||
super.show(args);
|
super.show(args);
|
||||||
if ("fadeOut" in args[0]) {
|
if (args[0].hasOwnProperty("fadeOut") && typeof args[0].fadeOut === "function") {
|
||||||
const overlay = this.scene.add.rectangle((( (this.getWidth() + (this.getMargin()[0] - this.getMargin()[3]))) / 2), ((this.getHeight() + (this.getMargin()[1] - this.getMargin()[2])) / 2),this.scene.game.canvas.width ,this.scene.game.canvas.height , 0);
|
const overlay = this.scene.add.rectangle((( (this.getWidth() + (this.getMargin()[0] - this.getMargin()[3]))) / 2), ((this.getHeight() + (this.getMargin()[1] - this.getMargin()[2])) / 2),this.scene.game.canvas.width ,this.scene.game.canvas.height , 0);
|
||||||
overlay.setName("rect-ui-overlay-modal");
|
overlay.setName("rect-ui-overlay-modal");
|
||||||
overlay.setAlpha(0);
|
overlay.setAlpha(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user