Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

‎1-js/11-async/03-promise-chaining/article.md‎

Lines changed: 1 addition & 2 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /