Skip to content

Commit 587a10e

Browse files
committed
Fix error on new actor creation
1 parent 1bf7f8f commit 587a10e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/module/actor/data-model-classes/data-model-character-scores.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ export default class OseDataModelCharacterScores implements CharacterScores {
145145
* @param {string} scores.cha - The character's charisma
146146
*/
147147
constructor({ str, int, wis, dex, con, cha }: Scores) {
148-
this.#str = str;
149-
this.#int = int;
150-
this.#wis = wis;
151-
this.#dex = dex;
152-
this.#con = con;
153-
this.#cha = cha;
148+
this.#str = str ?? 0;
149+
this.#int = int ?? 0;
150+
this.#wis = wis ?? 0;
151+
this.#dex = dex ?? 0;
152+
this.#con = con ?? 0;
153+
this.#cha = cha ?? 0;
154154
}
155155

156156
get str() {

0 commit comments

Comments
 (0)