diff --git a/lang/en.json b/lang/en.json index 3d225a82..3d0f9b07 100755 --- a/lang/en.json +++ b/lang/en.json @@ -113,6 +113,7 @@ "sectionTitle": "Areas", "shape": "Shape", "size": "Size" + }, "displayInChat": "Display in chat", "deleteTriggerTitle": "Delete Trigger", diff --git a/module/applications/sheets-configs/action-config.mjs b/module/applications/sheets-configs/action-config.mjs index d5adb79c..52067411 100644 --- a/module/applications/sheets-configs/action-config.mjs +++ b/module/applications/sheets-configs/action-config.mjs @@ -63,10 +63,11 @@ 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.call(this, null, null, { object: foundry.utils.flattenObject(data) }); - } else { + this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) }); + } + else { effectId = this.action.effects[index]._id; - this.constructor.removeElement.call(this, event, button); + this.constructor.removeElement.bind(this)(event, button); } this.action.item.deleteEmbeddedDocuments('ActiveEffect', [effectId]); diff --git a/module/applications/sheets-configs/action-settings-config.mjs b/module/applications/sheets-configs/action-settings-config.mjs index 5ec9fb5f..e525269f 100644 --- a/module/applications/sheets-configs/action-settings-config.mjs +++ b/module/applications/sheets-configs/action-settings-config.mjs @@ -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.call(this, null, null, { object: foundry.utils.flattenObject(data) }); + this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) }); } else { effectId = this.action.effects[index]._id; - this.constructor.removeElement.call(this, event, button); + this.constructor.removeElement.bind(this)(event, button); }