Skip to content

Commit

Permalink
Prune empty otherTags from all items on extract (foundryvtt#10335)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonward committed Sep 25, 2023
1 parent 9edc52d commit 1cc9846
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build/lib/extractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,11 +491,12 @@ class PackExtractor {
delete (source.system.description as { gm?: unknown }).gm;
}

if (source.system.traits?.otherTags?.length === 0) {
delete (source.system.traits as { otherTags?: unknown }).otherTags;
}

if (isPhysicalData(source)) {
delete (source.system as { identification?: unknown }).identification;
if (source.system.traits.otherTags?.length === 0) {
delete (source.system.traits as { otherTags?: unknown }).otherTags;
}

if (source.type === "consumable" && !source.system.spell) {
delete (source.system as { spell?: unknown }).spell;
Expand Down

0 comments on commit 1cc9846

Please sign in to comment.