From 6659087a8271d95bc14dbacd94818923262a655b Mon Sep 17 00:00:00 2001 From: Vlyan Date: Wed, 23 Dec 2020 21:00:47 +0100 Subject: [PATCH] fix formapp constructor --- system/scripts/actors/character-sheet.js | 2 +- system/scripts/actors/twenty-questions-dialog.js | 4 ++-- system/scripts/actors/twenty-questions.js | 2 +- system/scripts/dice/dice-picker-dialog.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/system/scripts/actors/character-sheet.js b/system/scripts/actors/character-sheet.js index 0d3f1f2..38bb7a6 100644 --- a/system/scripts/actors/character-sheet.js +++ b/system/scripts/actors/character-sheet.js @@ -31,7 +31,7 @@ export class CharacterSheetL5r5e extends BaseSheetL5r5e { class: "twenty-questions", icon: "fas fa-graduation-cap", onclick: async () => { - await new TwentyQuestionsDialog({}, this.actor).render(true); + await new TwentyQuestionsDialog(this.actor).render(true); }, }); return buttons; diff --git a/system/scripts/actors/twenty-questions-dialog.js b/system/scripts/actors/twenty-questions-dialog.js index ec0a843..2a4f7a9 100644 --- a/system/scripts/actors/twenty-questions-dialog.js +++ b/system/scripts/actors/twenty-questions-dialog.js @@ -43,8 +43,8 @@ export class TwentyQuestionsDialog extends FormApplication { /** * Create dialog */ - constructor(options = null, actor = null) { - super(options); + constructor(actor = null, options = {}) { + super({}, options); this.actor = actor; this.object = new TwentyQuestions(actor); this.errors = this.object.validateForm(); diff --git a/system/scripts/actors/twenty-questions.js b/system/scripts/actors/twenty-questions.js index acd7b8e..059f1e8 100644 --- a/system/scripts/actors/twenty-questions.js +++ b/system/scripts/actors/twenty-questions.js @@ -284,7 +284,7 @@ export class TwentyQuestions { }); // TODO Tmp - console.log(actor); + // console.log(actor); } /** diff --git a/system/scripts/dice/dice-picker-dialog.js b/system/scripts/dice/dice-picker-dialog.js index e588916..ba702f1 100644 --- a/system/scripts/dice/dice-picker-dialog.js +++ b/system/scripts/dice/dice-picker-dialog.js @@ -69,8 +69,8 @@ export class DicePickerDialog extends FormApplication { * * @param options actor, actorId, ringId, skillId, skillCatId, difficulty, difficultyHidden */ - constructor(options = null) { - super(options); + constructor(options = {}) { + super({}, options); // Try to get Actor from: options, first selected token or player's selected character [