getRollData recursion fix

This commit is contained in:
WBHarry 2025-06-09 20:13:20 +02:00
parent 2ba580da58
commit 610323fde9

View file

@ -1,11 +1,11 @@
/** /**
* Describes metadata about the actor data model type * Describes metadata about the actor data model type
* @typedef {Object} ItemDataModelMetadata * @typedef {Object} ActorDataModelMetadata
* @property {string} label - A localizable label used on application. * @property {string} label - A localizable label used on application.
* @property {string} type - The system type that this data model represents. * @property {string} type - The system type that this data model represents.
*/ */
export default class BaseDataActor extends foundry.abstract.TypeDataModel { export default class BaseDataActor extends foundry.abstract.TypeDataModel {
/** @returns {ItemDataModelMetadata}*/ /** @returns {ActorDataModelMetadata}*/
static get metadata() { static get metadata() {
return { return {
label: 'Base Actor', label: 'Base Actor',
@ -27,8 +27,8 @@ export default class BaseDataActor extends foundry.abstract.TypeDataModel {
* @param {object} [options] - Options which modify the getRollData method. * @param {object} [options] - Options which modify the getRollData method.
* @returns {object} * @returns {object}
*/ */
getRollData(options = {}) { getRollData() {
const data = this.getRollData(); const data = { ...this };
return data; return data;
} }
} }