mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): throw on fetch err when copying image
This commit is contained in:
parent
8b7f8eaea2
commit
3f4ea073d1
@ -25,6 +25,9 @@ export const useCopyImageToClipboard = () => {
|
||||
try {
|
||||
const getImageBlob = async () => {
|
||||
const response = await fetch(image_url);
|
||||
if (!response.ok) {
|
||||
throw new Error(`Problem retrieving image data`);
|
||||
}
|
||||
return await response.blob();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user