Skip to content

Commit e4da253

Browse files
committed
fix: prevent error when converting actors without race items
Thanks aronmero!
1 parent fd0b9ac commit e4da253

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/module/documents/actor.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export const convertActorData = (actor, options = {}) => {
6262

6363
// Senses and Movement (if not set by race)
6464
if (!actor.items.some((i) => i.type === "race")) {
65+
updateData.system.attributes ??= {};
6566
for (const field of ["senses", "movement"]) {
6667
const fieldData = actor.system?.attributes?.[field];
6768
updateData.system.attributes[field] = convertDistanceField(fieldData, target);

0 commit comments

Comments
 (0)