Merged with main

This commit is contained in:
WBHarry 2025-09-07 01:01:53 +02:00
commit 2c6aabb97a
31 changed files with 175 additions and 122 deletions

View file

@ -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);