fix: fetch the image type only if there's a possibility of a video type.

This commit is contained in:
Jin Liu
2024-06-10 19:48:10 +08:00
committed by GitHub
parent edc5321bfd
commit 746fc773a5
+3 -2
View File
@@ -249,8 +249,9 @@ export class ModelInfoDialog extends ComfyDialog {
})
);
if (info.images?.length) {
this.img.src = info.images[0].url;
const preview = info.images.find((i) => i.type === "image");
if (preview) {
this.img.src = preview.url;
this.img.style.display = "";
this.imgSave = $el("button", {