Skip to content

Commit a6c0fad

Browse files
authored
Merge pull request #2686 from mindv0rtex/patch-1
Make use of `loadJson` inside `loadGithubUser`
2 parents 3b7a35e + 12d7968 commit a6c0fad

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: 1-js/11-async/03-promise-chaining/article.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,7 @@ function loadJson(url) {
332332
}
333333

334334
function loadGithubUser(name) {
335-
return fetch(`https://api.github.com/users/${name}`)
336-
.then(response => response.json());
335+
return loadJson(`https://api.github.com/users/${name}`);
337336
}
338337

339338
function showAvatar(githubUser) {

0 commit comments

Comments
 (0)