Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
fix: restored a bug due to character serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
villetakanen committed Dec 10, 2021
1 parent 0dd3309 commit 00e6b6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/state/characters/Character.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export class Character extends CharacterSheet {
ingestStats (stats: { [key: string]: number|string }): void {
Object.keys(stats).forEach(k => {
logDebug('Character.ingestStats', k, stats[k])
this.setStat(k, stats[k])
// if there is a forumula, the stat is composite and can not be set directly
if (!super.model.stats[k].formula) this.setStat(k, stats[k])
})
}

Expand Down

0 comments on commit 00e6b6a

Please sign in to comment.