From 484530d67d86339e197618fd07230c54bdb74844 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Thu, 12 Jan 2023 20:52:58 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20chronologie=20si=20le=20journal=20est=20?= =?UTF-8?q?supprim=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/dialog-chronologie.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/dialog-chronologie.js b/module/dialog-chronologie.js index 59ba9542..3d0cc1d1 100644 --- a/module/dialog-chronologie.js +++ b/module/dialog-chronologie.js @@ -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));