Skip to content

Commit 12d7968

Browse files
author
Yan
authored
Make use of loadJson inside loadGithubUser
1 parent ef8d576 commit 12d7968

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)