Skip to content

Commit

Permalink
fix: onErrorRetry example (#87)
Browse files Browse the repository at this point in the history
* fix: onErrorRetry example

* fix zh

Co-authored-by: Paco <[email protected]>
  • Loading branch information
huozhi and pacocoursey authored Apr 14, 2021
1 parent 8760592 commit 4d03f9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pages/docs/error-handling.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ useSWR('/api/user', fetcher, {
if (retryCount >= 10) return

// Retry after 5 seconds.
setTimeout(() => revalidate({ retryCount: retryCount + 1 }), 5000)
setTimeout(() => revalidate({ retryCount }), 5000)
}
})
```
Expand Down
2 changes: 1 addition & 1 deletion pages/docs/error-handling.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ useSWR('/api/user', fetcher, {
if (retryCount >= 10) return

// 5秒后重试。
setTimeout(() => revalidate({ retryCount: retryCount + 1 }), 5000)
setTimeout(() => revalidate({ retryCount: retryCount }), 5000)
}
})
```
Expand Down

1 comment on commit 4d03f9d

@vercel
Copy link

@vercel vercel bot commented on 4d03f9d Apr 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

Please sign in to comment.