This commit is contained in:
@@ -220,14 +220,15 @@ export default class MournbladeActorSheet extends HandlebarsApplicationMixin(fou
|
||||
* Handle editing the actor image
|
||||
* @param {Event} event - The triggering event
|
||||
*/
|
||||
static async #onEditImage(event) {
|
||||
static async #onEditImage(event, target) {
|
||||
event.preventDefault()
|
||||
const sheet = this
|
||||
const attr = target.dataset.edit || "img"
|
||||
const current = foundry.utils.getProperty(this.document, attr) ?? this.document.img
|
||||
const filePicker = new FilePicker({
|
||||
type: "image",
|
||||
current: sheet.document.img,
|
||||
current,
|
||||
callback: (path) => {
|
||||
sheet.document.update({ img: path })
|
||||
this.document.update({ [attr]: path })
|
||||
},
|
||||
})
|
||||
filePicker.browse()
|
||||
|
||||
Reference in New Issue
Block a user