mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Merged with main
This commit is contained in:
commit
2c6aabb97a
31 changed files with 175 additions and 122 deletions
|
|
@ -218,7 +218,8 @@ export default class CostField extends fields.ArrayField {
|
|||
* @returns
|
||||
*/
|
||||
static getRealCosts(costs) {
|
||||
const realCosts = costs?.length ? costs.filter(c => c.enabled) : [];
|
||||
const cloneCosts = foundry.utils.deepClone(costs),
|
||||
realCosts = cloneCosts?.length ? cloneCosts.filter(c => c.enabled) : [];
|
||||
let mergedCosts = [];
|
||||
realCosts.forEach(c => {
|
||||
const getCost = Object.values(mergedCosts).find(gc => gc.key === c.key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue