using function.call instead of function.bind

This commit is contained in:
WBHarry 2026-04-20 22:18:41 +02:00
parent 4800b3a943
commit 1f4241437e
2 changed files with 4 additions and 4 deletions

View file

@ -63,10 +63,10 @@ export default class DHActionConfig extends DHActionBaseConfig {
effectId = this.action.area[areaIndex].effects[index];
const data = this.action.toObject();
data.area[areaIndex].effects.splice(index, 1);
this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) });
this.constructor.updateForm.call(this, null, null, { object: foundry.utils.flattenObject(data) });
} else {
effectId = this.action.effects[index]._id;
this.constructor.removeElement.bind(this)(event, button);
this.constructor.removeElement.call(this, event, button);
}
this.action.item.deleteEmbeddedDocuments('ActiveEffect', [effectId]);

View file

@ -56,10 +56,10 @@ export default class DHActionSettingsConfig extends DHActionBaseConfig {
effectId = this.action.area[areaIndex].effects[index];
const data = this.action.toObject();
data.area[areaIndex].effects.splice(index, 1);
this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) });
this.constructor.updateForm.call(this, null, null, { object: foundry.utils.flattenObject(data) });
} else {
effectId = this.action.effects[index]._id;
this.constructor.removeElement.bind(this)(event, button);
this.constructor.removeElement.call(this, event, button);
}