Merge branch 'development' into fix/use-experience-or-adv-disadv-on-roll

This commit is contained in:
Chris Ryan 2025-09-07 09:07:54 +10:00
commit e540a21bdc
99 changed files with 1741 additions and 796 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);