REFACTOR: prettier format

This commit is contained in:
Joaquin Pereyra 2025-06-17 19:10:48 -03:00
parent d18141bb65
commit 4fbd2fb15c
3 changed files with 18 additions and 19 deletions

View file

@ -1,3 +1,3 @@
export { default as FormulaField } from './formulaField.mjs';
export { default as ForeignDocumentUUIDField } from './foreignDocumentUUIDField.mjs';
export { default as ForeignDocumentUUIDArrayField } from "./foreignDocumentUUIDArrayField.mjs";
export { default as ForeignDocumentUUIDArrayField } from './foreignDocumentUUIDArrayField.mjs';

View file

@ -1,4 +1,4 @@
import ForeignDocumentUUIDField from "./foreignDocumentUUIDField.mjs";
import ForeignDocumentUUIDField from './foreignDocumentUUIDField.mjs';
/**
* A subclass of {@link foundry.data.fields.ArrayField} that defines an array of foreign document UUID references.
*/
@ -15,7 +15,6 @@ export default class ForeignDocumentUUIDArrayField extends foundry.data.fields.A
/** @inheritdoc */
initialize(value, model, options = {}) {
const v = super.initialize(value, model, options);
return () => v.map(entry => typeof entry === 'function' ? entry() : entry);
return () => v.map(entry => (typeof entry === 'function' ? entry() : entry));
}
}

View file

@ -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 */