mirror of
https://github.com/RoY7x/worldbuilding.git
synced 2025-07-04 13:47:10 -04:00
[#40] Fix issue with using non-resource type attributes for token bars.
This commit is contained in:
parent
78926508a6
commit
297cce85ec
2 changed files with 3 additions and 3 deletions
|
@ -9,7 +9,7 @@ export class SimpleTokenDocument extends TokenDocument {
|
|||
const attr = alternative || this.data[barName]?.attribute;
|
||||
if ( !data || !attr || !this.actor ) return data;
|
||||
const current = foundry.utils.getProperty(this.actor.data.data, attr);
|
||||
if ( "min" in current ) data.min = parseInt(current.min || 0);
|
||||
if ( current?.dtype === "Resource" ) data.min = parseInt(current.min || 0);
|
||||
data.editable = true;
|
||||
return data;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue