Fix image's behavior on create for all items sub classes

This commit is contained in:
Vlyan
2021-02-01 17:51:27 +01:00
parent 68577737fc
commit 4350506e09
3 changed files with 10 additions and 2 deletions

View File

@@ -4,7 +4,9 @@ export class ItemL5r5e extends Item {
* @override
*/
static async create(data, options = {}) {
data.img = `${CONFIG.l5r5e.paths.assets}icons/items/${data.type}.svg`;
if (data.img === undefined) {
data.img = `${CONFIG.l5r5e.paths.assets}icons/items/${data.type}.svg`;
}
return super.create(data, options);
}
}