Fixed issue #23 "Token image does not save"
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
## 1.3.1 - Scholar helper
|
||||
- Added a Journal Compendium for School Curriculums.
|
||||
- Fix for the "bought_at_rank" value when an Item was on dropped on a sheet.
|
||||
- Fix for issue #23 "Token image does not save".
|
||||
|
||||
## 1.3.0 - Foundry 0.8 Compatibility
|
||||
__! Be certain to carefully back up any critical user data before installing this update !__
|
||||
|
||||
@@ -65,12 +65,17 @@ export class ActorL5r5e extends Actor {
|
||||
*/
|
||||
async update(data = {}, context = {}) {
|
||||
// Need a _id
|
||||
if (!data["_id"]) {
|
||||
if (!data._id) {
|
||||
data["_id"] = this.id;
|
||||
}
|
||||
|
||||
// Fix for token image unliked from character... dunno why
|
||||
if (data.img) {
|
||||
// Update the token image if the sheet image changed, but only if they are the same and linked to actor
|
||||
if (
|
||||
data.img &&
|
||||
this.data.img === this.data.token.img &&
|
||||
this.data.img !== data.img &&
|
||||
(data.token?.actorLink || (data.token?.actorLink === undefined && this.data.token.actorLink))
|
||||
) {
|
||||
data["token.img"] = data.img;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user