fix formapp constructor
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -284,7 +284,7 @@ export class TwentyQuestions {
|
||||
});
|
||||
|
||||
// TODO Tmp
|
||||
console.log(actor);
|
||||
// console.log(actor);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user