Skip to content

Commit

Permalink
Fix bug in data-fetching.md's example (#9868)
Browse files Browse the repository at this point in the history
Add missing `await` keyword in the Static Generation example
  • Loading branch information
konstantinmuenster authored and timneutkens committed Dec 29, 2019
1 parent be3b5b7 commit 356e5ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/basic-features/data-fetching.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import useSWR from 'swr'

const API_URL = 'https://api.github.com'
async function fetcher(path) {
const res = fetch(API_URL + path)
const res = await fetch(API_URL + path)
const json = await res.json()
return json
}
Expand Down

0 comments on commit 356e5ca

Please sign in to comment.