Simplify handling of optional values in a couple of places
This commit is contained in:
parent
24d8926645
commit
b2490a2e2f
2 changed files with 5 additions and 7 deletions
|
@ -26,9 +26,9 @@ export class DS4Item extends Item<DS4ItemData> {
|
|||
/**
|
||||
* The number of times that active effect changes originating from this item should be applied.
|
||||
*/
|
||||
get activeEffectFactor(): number {
|
||||
get activeEffectFactor(): number | undefined {
|
||||
if (this.data.type === "talent") {
|
||||
return this.data.data.rank.total ?? this.data.data.rank.base + this.data.data.rank.mod;
|
||||
return this.data.data.rank.total;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue