Fix layperson skills ate character creation
Release Creation / build (release) Successful in 53s

This commit is contained in:
2026-07-07 08:30:23 +02:00
parent 7675c47ff9
commit 5734f3a5e3
+4 -2
View File
@@ -7,8 +7,10 @@ export default class LethalFantasyActor extends Actor {
if (data instanceof Array) { if (data instanceof Array) {
return super.create(data, options); return super.create(data, options);
} }
// If the created actor has items (only applicable to duplicated actors) bypass the new actor creation logic // If the created actor already has items (duplicated or imported) bypass the new actor creation logic.
if (data.items) { // Use .length check because Foundry V2 initializes data.items as an empty array by default
// (truthy), which would incorrectly skip the layperson skill auto-population.
if (data.items?.length > 0) {
let actor = super.create(data, options); let actor = super.create(data, options);
return actor; return actor;
} }