Fix editing of bar attributes in v14

This commit is contained in:
Carlos Fernandez 2026-04-09 15:25:22 -04:00
parent 7fa03c58e0
commit 216970e3da

View file

@ -89,13 +89,13 @@ class ResourcesField extends fields.TypedObjectField {
*/ */
_getField(path) { _getField(path) {
if (path.length === 0) return this; if (path.length === 0) return this;
const first = path.shift(); const name = path.pop();
if (first === this.element.name) return this.element_getField(path); if (name === this.element.name) return this.element_getField(path);
const resources = CONFIG.DH.RESOURCE[this.actorType].all; const resources = CONFIG.DH.RESOURCE[this.actorType].all;
if (first in resources) { if (name in resources) {
const field = this.element._getField(path); const field = this.element._getField(path);
field.label = resources[first].label; field.label = resources[name].label;
return field; return field;
} }