From 5734f3a5e349225c4b3e6ef1d22314f514ea2555 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnier Date: Tue, 7 Jul 2026 08:30:23 +0200 Subject: [PATCH] Fix layperson skills ate character creation --- module/documents/actor.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/documents/actor.mjs b/module/documents/actor.mjs index f3576a4..28e158f 100644 --- a/module/documents/actor.mjs +++ b/module/documents/actor.mjs @@ -7,8 +7,10 @@ export default class LethalFantasyActor extends Actor { if (data instanceof Array) { return super.create(data, options); } - // If the created actor has items (only applicable to duplicated actors) bypass the new actor creation logic - if (data.items) { + // If the created actor already has items (duplicated or imported) bypass the new actor creation logic. + // 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); return actor; }