From 6ccf62a863bd7e7589587ffd1abde3dc1550dfab Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Mon, 26 Jun 2023 19:20:05 +1000 Subject: [PATCH] feat(ui): only show canvas image fallback on loading error --- .../web/src/features/canvas/components/IAICanvasImage.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/invokeai/frontend/web/src/features/canvas/components/IAICanvasImage.tsx b/invokeai/frontend/web/src/features/canvas/components/IAICanvasImage.tsx index ca838d9922..07cad52173 100644 --- a/invokeai/frontend/web/src/features/canvas/components/IAICanvasImage.tsx +++ b/invokeai/frontend/web/src/features/canvas/components/IAICanvasImage.tsx @@ -9,10 +9,12 @@ type IAICanvasImageProps = { }; const IAICanvasImage = (props: IAICanvasImageProps) => { const { width, height, x, y, imageName } = props.canvasImage; - const { currentData: imageDTO } = useGetImageDTOQuery(imageName ?? skipToken); + const { currentData: imageDTO, isError } = useGetImageDTOQuery( + imageName ?? skipToken + ); const [image] = useImage(imageDTO?.image_url ?? '', 'anonymous'); - if (!imageDTO) { + if (isError) { return ; }