This commit is contained in:
cha0s 2021-01-19 16:52:18 -06:00
parent d2bb1273ac
commit 37561dd66a

View File

@ -149,7 +149,7 @@ export default (latus) => class Pictured extends decorate(Trait) {
const {fromResourceType: {Image}} = resource(latus);
const sprites = await mapValuesAsync(
this.params.images,
async (json) => new Sprite(await Image.load(json)),
async (json) => new Sprite(await Image.load(json.uri)),
);
Object.keys(sprites).forEach((key) => {
// eslint-disable-next-line no-param-reassign
@ -178,6 +178,9 @@ export default (latus) => class Pictured extends decorate(Trait) {
}
showImage(key) {
if (!this.entity.container) {
return;
}
if (!this.#sprites) {
return;
}