1
0
Fork 0
forked from OpenNeo/impress

Handle crash on new item page when SWF asset has no image available

This commit is contained in:
Emi Matchu 2024-09-06 17:57:18 -07:00
parent 052c02f841
commit c9f2d660bc
2 changed files with 4 additions and 4 deletions

View file

@ -112,9 +112,7 @@ class OutfitLayer extends HTMLElement {
this.#setStatus("error"),
);
} else {
throw new Error(
`<outfit-layer> must contain an <img> or <iframe> tag`,
);
console.warn(`<outfit-layer> contained no image or iframe: `, this);
}
}

View file

@ -20,5 +20,7 @@
}
- if swf_asset.canvas_movie?
%iframe{src: swf_asset_path(swf_asset, playing: outfit_viewer_is_playing ? true : nil)}
- elsif swf_asset.image_url.present?
= image_tag swf_asset.image_url, alt: ""
- else
= image_tag swf_asset.image_url, alt: ""
/ No movie or image available for SWF asset: #{swf_asset.url}