mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Bug/124 foreigndocumentuuidfields fail initial initialization (#150)
* FIX: Remove the psudo-documents because they will be used. * FIX: ForeignDocumentUUIDField initialize like a getter FEAT: ForeignDocumentUUIDArrayField created and used * REFACTOR: prettier format --------- Co-authored-by: Joaquin Pereyra <joaquinpereyra98@users.noreply.github.com>
This commit is contained in:
parent
96ed90b5fc
commit
a0a5196825
20 changed files with 33 additions and 632 deletions
|
|
@ -23,7 +23,7 @@ export default class ForeignDocumentUUIDField extends foundry.data.fields.Docume
|
|||
/**@override */
|
||||
initialize(value, _model, _options = {}) {
|
||||
if (this.idOnly) return value;
|
||||
return (() => {
|
||||
return () => {
|
||||
try {
|
||||
const doc = fromUuidSync(value);
|
||||
return doc;
|
||||
|
|
@ -31,7 +31,7 @@ export default class ForeignDocumentUUIDField extends foundry.data.fields.Docume
|
|||
console.error(error);
|
||||
return value ?? null;
|
||||
}
|
||||
})();
|
||||
};
|
||||
}
|
||||
|
||||
/**@override */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue