Skip to content

Commit

Permalink
fix: Images stuck in loading state when triggered by memory cache for…
Browse files Browse the repository at this point in the history
… image links
  • Loading branch information
hippone authored and yinkaihui committed Mar 15, 2024
1 parent a2939b7 commit 54df7e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/Image/image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function Image(baseProps: ImagePropsType, ref: LegacyRef<HTMLDivElement>) {
if ((refImg.current.src || src) && refImg.current.src !== src) {
refImg.current.src = src;
}
if (!loaded.current) {
if (!loaded.current && !refImg.current.complete) {
setStatus('loading');
}
} else {
Expand Down

0 comments on commit 54df7e6

Please sign in to comment.