fix bug in Random image

main
Mike Fix 6 years ago
parent 117b4f021a
commit 33915d41c1

@ -20,7 +20,7 @@ function RandomImage(props) {
api.unsplash.random api.unsplash.random
) )
const needsFetch = !error && !updating && (!imgs || cacheIndex > cache.length - 2) const needsFetch = !error && !updating && (!imgs || cacheIndex > cacheRef.current.length - 2)
React.useEffect(() => { React.useEffect(() => {
if (needsFetch) { if (needsFetch) {

Loading…
Cancel
Save