Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli committed Sep 24, 2023
1 parent 8af7b38 commit ce99a50
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/react-image/src/Load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ const loadClient = new (class LoadClient {

public _load = <TSrc extends Src>(src: TSrc): { src: TSrc } => {
const loadStateGot = loadCache.get(src);

if (loadStateGot?.error) {
throw loadStateGot.error;
}
if (loadStateGot?.src) {
return loadStateGot as LoadState<TSrc>;
}

if (loadStateGot?.promise) {
throw loadStateGot.promise;
}
Expand All @@ -52,7 +50,6 @@ const loadClient = new (class LoadClient {
.then((image) => (newLoadState.src = image.src as TSrc))
.catch(() => (newLoadState.error = `${src}: load error`)),
};

loadCache.set(src, newLoadState);
throw newLoadState.promise;
};
Expand Down

0 comments on commit ce99a50

Please sign in to comment.