mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Preventing getRollData from returning infinite recursion on the system property
This commit is contained in:
parent
e74ce7726a
commit
5c1aff0245
2 changed files with 2 additions and 2 deletions
|
|
@ -102,7 +102,7 @@ export default class BaseDataActor extends foundry.abstract.TypeDataModel {
|
||||||
* @returns {object}
|
* @returns {object}
|
||||||
*/
|
*/
|
||||||
getRollData() {
|
getRollData() {
|
||||||
const data = { ...this };
|
const data = { ...this, system: { ...this.system, system: {} } };
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
||||||
*/
|
*/
|
||||||
getRollData(options = {}) {
|
getRollData(options = {}) {
|
||||||
const actorRollData = this.actor?.getRollData() ?? {};
|
const actorRollData = this.actor?.getRollData() ?? {};
|
||||||
const data = { ...actorRollData, item: { ...this } };
|
const data = { ...actorRollData, item: { ...this, system: this.system } };
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue