mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 21:04:16 +02:00
Preload ancestry and community features in description
This commit is contained in:
parent
77c5cfcbb7
commit
3b98c3f4af
3 changed files with 12 additions and 3 deletions
|
|
@ -879,6 +879,7 @@ export async function fromUuids(uuids) {
|
|||
const packEmbeddedEntries = entries.filter(
|
||||
e =>
|
||||
!(e.value instanceof Document) &&
|
||||
e.parsed &&
|
||||
e.parsed.collection instanceof foundry.documents.collections.CompendiumCollection &&
|
||||
e.parsed.embedded.length > 0
|
||||
);
|
||||
|
|
@ -895,7 +896,7 @@ export async function fromUuids(uuids) {
|
|||
const pack = game.packs.get(packGroup[0].value.pack);
|
||||
if (!pack) continue;
|
||||
|
||||
const ids = packGroup.map(p => p.parsed.id);
|
||||
const ids = packGroup.map(p => p.parsed?.id).filter(id => !!id);
|
||||
const documents = await pack.getDocuments({ _id__in: ids });
|
||||
for (const p of packGroup) {
|
||||
p.value = documents.find(d => d.id === p.parsed.id) ?? p.value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue