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