diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index bfe63304..5ba8345b 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,6 +1,7 @@ # vX.X.X ## Bugs +* [#723] Cannot edit gems in a character's gem bag * [#964] Unable to edit/modify active effects on Items ## Chores diff --git a/system/src/apps/GemBagSD.mjs b/system/src/apps/GemBagSD.mjs index 8f891b68..958c7f08 100644 --- a/system/src/apps/GemBagSD.mjs +++ b/system/src/apps/GemBagSD.mjs @@ -97,15 +97,17 @@ export default class GemBagSD extends Application { } _getItemContextOptions() { - const canEdit = function(tr) { + const me = this; + + const canEdit = function(element) { let result = false; - const itemId = tr.data("item-id"); + const itemId = element.data("item-id"); if (game.user.isGM) { result = true; } else { - result = this.actor.items.find(item => item._id === itemId) + result = me.actor.items.find(item => item._id === itemId) ? true : false; } @@ -127,8 +129,8 @@ export default class GemBagSD extends Application { { name: game.i18n.localize("SHADOWDARK.sheet.general.item_delete.title"), icon: '', - condition: tr => canEdit(tr), - callback: tr => { + condition: element => canEdit(element), + callback: element => { const itemId = tr.data("item-id"); this._onItemDelete(itemId); },