You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FoundryVTT 12.331
dnd5e 4.1.2
Chrome v131.0.6778.140.
No modules.
Calling prepareData on an actor whose token is placed on the canvas throws an error. For example:
_token.actor.prepareData()base-activity.mjs:563UncaughtTypeError: Cannotredefineproperty: _inferredSourceatFunction.defineProperty(<anonymous>)
at CheckActivity.prepareFinalData (base-activity.mjs:563:12)
at CheckActivity.prepareFinalData (check-data.mjs:64:11)
at ToolData.prepareFinalActivityData (activities.mjs:299:56)
at ToolData.prepareFinalData (tool.mjs:123:10)
at Item5e.prepareFinalAttributes (item.mjs:670:33)
at actor.mjs:200:37
at EmbeddedCollection.forEach (foundry-esm.js:5031:9)
at Actor5e.prepareData (actor.mjs:200:16)
at <anonymous>:1:14
Same for NPCs:
_token.actor.prepareData()source-field.mjs:105UncaughtTypeError: Cannotredefineproperty: sourceatFunction.defineProperty(<anonymous>)
at NPCData.shimActor (source-field.mjs:105:12)
at NPCData.prepareBaseData (npc.mjs:324:27)
at Actor5e.prepareData (foundry.js:10820:37)
at Actor5e.prepareData (foundry.js:15863:11)
at Actor5e.prepareData (flags.mjs:21:11)
at Actor5e.prepareData (actor.mjs:199:11)
at <anonymous>:1:14
This seems to happen when prepareFinalAttributes is called on an item with activities that were copied from an existing one (ie a cloned item).
This appears to be an error because I would expect prepareData to be idempotent and, if the data need not be prepared, it should just return. I would also expect prepareData to trigger an update if data has changed that has not yet been accounted for.
This behavior is different than what was seen in dnd5e v3. (No error was thrown in this situation.)
The text was updated successfully, but these errors were encountered:
FoundryVTT 12.331
dnd5e 4.1.2
Chrome v131.0.6778.140.
No modules.
Calling
prepareData
on an actor whose token is placed on the canvas throws an error. For example:Same for NPCs:
This seems to happen when
prepareFinalAttributes
is called on an item with activities that were copied from an existing one (ie a cloned item).This appears to be an error because I would expect
prepareData
to be idempotent and, if the data need not be prepared, it should just return. I would also expectprepareData
to trigger an update if data has changed that has not yet been accounted for.This behavior is different than what was seen in dnd5e v3. (No error was thrown in this situation.)
The text was updated successfully, but these errors were encountered: