Skip to content

Commit

Permalink
fix: clear interval on status other than 403
Browse files Browse the repository at this point in the history
  • Loading branch information
IanKrieger committed Sep 20, 2023
1 parent 0d4685e commit a695b67
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Assets/hooks/useGetImagePreviewUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function useGetImagePreviewUrl(props: { url: string }) {
}

if (result.status !== 403) {
clearInterval(intrvl);
reject(new Error("Unable to fetch image"));
}
}, 5000);
Expand Down

0 comments on commit a695b67

Please sign in to comment.