fix formapp constructor

This commit is contained in:
Vlyan
2020-12-23 21:00:47 +01:00
parent cf06635b01
commit 6659087a82
4 changed files with 6 additions and 6 deletions

View File

@@ -31,7 +31,7 @@ export class CharacterSheetL5r5e extends BaseSheetL5r5e {
class: "twenty-questions", class: "twenty-questions",
icon: "fas fa-graduation-cap", icon: "fas fa-graduation-cap",
onclick: async () => { onclick: async () => {
await new TwentyQuestionsDialog({}, this.actor).render(true); await new TwentyQuestionsDialog(this.actor).render(true);
}, },
}); });
return buttons; return buttons;

View File

@@ -43,8 +43,8 @@ export class TwentyQuestionsDialog extends FormApplication {
/** /**
* Create dialog * Create dialog
*/ */
constructor(options = null, actor = null) { constructor(actor = null, options = {}) {
super(options); super({}, options);
this.actor = actor; this.actor = actor;
this.object = new TwentyQuestions(actor); this.object = new TwentyQuestions(actor);
this.errors = this.object.validateForm(); this.errors = this.object.validateForm();

View File

@@ -284,7 +284,7 @@ export class TwentyQuestions {
}); });
// TODO Tmp // TODO Tmp
console.log(actor); // console.log(actor);
} }
/** /**

View File

@@ -69,8 +69,8 @@ export class DicePickerDialog extends FormApplication {
* *
* @param options actor, actorId, ringId, skillId, skillCatId, difficulty, difficultyHidden * @param options actor, actorId, ringId, skillId, skillCatId, difficulty, difficultyHidden
*/ */
constructor(options = null) { constructor(options = {}) {
super(options); super({}, options);
// Try to get Actor from: options, first selected token or player's selected character // Try to get Actor from: options, first selected token or player's selected character
[ [