mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 04:01:06 +01:00
FEAT: add TypedPseudoDocument
REFACTOR: PreudoDocument FIX: Typos Bug
This commit is contained in:
parent
a0b0411a48
commit
88bf26dad0
21 changed files with 559 additions and 447 deletions
|
|
@ -3,8 +3,8 @@ export default class DhpItem extends Item {
|
|||
getEmbeddedDocument(embeddedName, id, { invalid = false, strict = false } = {}) {
|
||||
const systemEmbeds = this.system.constructor.metadata.embedded ?? {};
|
||||
if (embeddedName in systemEmbeds) {
|
||||
const path = `system.${systemEmbeds[embeddedName]}.${id}`;
|
||||
return foundry.utils.getProperty(this, path) ?? null;
|
||||
const path = `system.${systemEmbeds[embeddedName]}`;
|
||||
return foundry.utils.getProperty(this, path).get(id) ?? null;
|
||||
}
|
||||
return super.getEmbeddedDocument(embeddedName, id, { invalid, strict });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue