Fix: chronologie si le journal est supprimé

This commit is contained in:
Vincent Vandemeulebrouck 2023-01-12 20:52:58 +01:00
parent a08890dcb0
commit 484530d67d

View File

@ -63,7 +63,8 @@ export class DialogChronologie extends Dialog {
activateListeners(html) {
this.html = html;
super.activateListeners(html);
this.showChronologiePreset(!game.journal.get(this.dialogData.journalId).canUserModify(game.user))
const journalPrecedent = game.journal.get(this.dialogData.journalId);
this.showChronologiePreset(!(journalPrecedent?.canUserModify(game.user)))
this.html.find("a.chronologie-preset-show").click(event => this.showChronologiePreset(true));
this.html.find("a.chronologie-preset-hide").click(event => this.showChronologiePreset(false));