mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Fix editing of bar attributes in v14 (#1786)
This commit is contained in:
parent
087e69694c
commit
b505e15eb2
1 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue