Fix erreurs dans console sur fenêtre TMR
ajout de mécanismes de sécurité pour éviter erreur rare (liée à un état étrange après avoir été dans les TMR)
This commit is contained in:
@@ -13,7 +13,6 @@ import { Draconique } from "./tmr/draconique.js";
|
||||
import { HtmlUtility } from "./html-utility.js";
|
||||
import { ReglesOptionnelles } from "./settings/regles-optionnelles.js";
|
||||
import { RdDDice } from "./rdd-dice.js";
|
||||
import { STATUSES } from "./settings/status-effects.js";
|
||||
import { RdDRencontre } from "./item/rencontre.js";
|
||||
import { ITEM_TYPES } from "./constants.js";
|
||||
import { Misc } from "./misc.js";
|
||||
@@ -187,7 +186,9 @@ export class RdDTMRDialog extends Dialog {
|
||||
async restoreTMRAfterAction() {
|
||||
this.subdialog = undefined
|
||||
await this.maximize()
|
||||
this.bringToFront()
|
||||
if (this.rendered) {
|
||||
this.bringToFront()
|
||||
}
|
||||
}
|
||||
|
||||
forceTMRContinueAction() {
|
||||
@@ -348,10 +349,10 @@ export class RdDTMRDialog extends Dialog {
|
||||
return false
|
||||
}
|
||||
this.descenteTMR = true
|
||||
await await this.actor.quitterTMR(message, this.viewOnly, this.cumulFatigue)
|
||||
this.pixiTMR.close();
|
||||
await await this.actor?.quitterTMR(message, this.viewOnly, this.cumulFatigue)
|
||||
this.pixiTMR?.close()
|
||||
this.pixiTMR = undefined
|
||||
await super.close();
|
||||
await super.close()
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user