Skip to content

Commit

Permalink
Clear subjectPath cache more aggressively.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fyorl committed Jan 26, 2024
1 parent 0a58289 commit 0dd800c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion module/documents/token.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ export default class TokenDocument5e extends SystemFlagsMixin(TokenDocument) {

/** @inheritDoc */
_onUpdate(data, options, userId) {
if ( foundry.utils.hasProperty(data, "texture.src") ) this.#subjectPath = null;
const textureChange = foundry.utils.hasProperty(data, "texture.src");
const tokenRingChange = foundry.utils.hasProperty(data, "flags.dnd5e.tokenRings.enabled");
if ( textureChange || tokenRingChange ) this.#subjectPath = null;
super._onUpdate(data, options, userId);
}

Expand Down

0 comments on commit 0dd800c

Please sign in to comment.