Merge pull request #76 from abc-mikey/fix_shorthand_formula_bug

Fix for shorthand formula
This commit is contained in:
Andrew (Atropos) 2025-03-22 11:53:36 -04:00 committed by GitHub
commit f7f8901b8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -176,7 +176,7 @@ export class SimpleActor extends Actor {
let formula = '';
if ( !!shorthand ) {
// Handle grouped attributes first.
if ( data.items[item][k][gk] ) {
if ( data.items[item][k]?.[gk] !== undefined ) {
formula = data.items[item][k][gk].replace('@item.', `@items.${item}.`);
data.items[item][k][gk] = Roll.replaceFormulaData(formula, data);
}