This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user