Skip to content

Commit f0708de

Browse files
committed
Fix token img update when regenerating character.
1 parent 9470c33 commit f0708de

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 0.9.1
2+
- Fix token img update when regenerating character.
3+
14
# 0.9.0
25
- Create round token images for all character portraits, and use in generator.
36

module/generator.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ export const regenerateCharacter = async (actor) => {
1717
await actor.createEmbeddedDocuments("Item", char.items);
1818
await maybeGiveStartingBonus(actor);
1919
// update any actor tokens in the scene, too
20+
console.log(actor);
2021
for (const token of actor.getActiveTokens()) {
22+
console.log(token);
2123
await token.document.update({
22-
img: actor.data.img,
23-
name: actor.name,
24+
img: actor.data.token.img,
25+
name: actor.name
2426
});
2527
}
2628
};

0 commit comments

Comments
 (0)