Skip to content

Commit

Permalink
Merge branch 'resolve-injected-damage-type' into 'master'
Browse files Browse the repository at this point in the history
Pass `damageType` property on `FlatModifier` REs through `resolveInjectedProperties`

See merge request hooking/foundry-vtt---pathfinder-2e!6178
  • Loading branch information
CarlosFdez committed Nov 27, 2021
2 parents 2eda30f + a9973d6 commit 4dfa0aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/module/rules/elements/flat-modifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class FlatModifierRuleElement extends RuleElementPF2e {
);
modifier.label = this.label;
if (this.data.damageType) {
modifier.damageType = this.data.damageType;
modifier.damageType = this.resolveInjectedProperties(this.data.damageType);
}
if (this.data.damageCategory) {
modifier.damageCategory = this.data.damageCategory;
Expand Down
2 changes: 1 addition & 1 deletion src/util/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export function sluggify(label: string, { camel = null }: { camel?: "dromedary"
}
case "dromedary":
return label
.replace(/'/g, "")
.replace(/[^-\w\s]/g, "")
.replace(/[-_]+/g, " ")
.replace(/(?:^\w|[A-Z]|\b\w)/g, (part, index) =>
index === 0 ? part.toLowerCase() : part.toUpperCase()
Expand Down

0 comments on commit 4dfa0aa

Please sign in to comment.