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));