mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-12-26 00:49:17 +01:00
fix undefined bug
This commit is contained in:
parent
7f3279f20f
commit
fcf5c41709
@ -25,6 +25,12 @@ export default function CompletedImages({
|
||||
<div className={completedImagesMain}>
|
||||
{images &&
|
||||
images.map((image, index) => {
|
||||
|
||||
if (void 0 === image) {
|
||||
console.warn(`image ${index} is undefined`);
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<button
|
||||
key={index}
|
||||
|
@ -97,8 +97,11 @@ export default function DisplayPanel() {
|
||||
}
|
||||
})
|
||||
.flat()
|
||||
.reverse();
|
||||
.reverse()
|
||||
.filter((item) => void 0 !== item); // remove undefined items
|
||||
|
||||
setCompletedImages(temp);
|
||||
debugger;
|
||||
setCurrentImage(temp[0] || null);
|
||||
} else {
|
||||
setCompletedImages([]);
|
||||
@ -113,6 +116,7 @@ export default function DisplayPanel() {
|
||||
<CurrentDisplay image={currentImage}></CurrentDisplay>
|
||||
</div>
|
||||
<div className={previousImages}>
|
||||
|
||||
<CompletedImages
|
||||
images={completedImages}
|
||||
setCurrentDisplay={setCurrentImage}
|
||||
|
2
ui/frontend/dist/index.js
vendored
2
ui/frontend/dist/index.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user