From 12d79680e82cb3464a9ae4b09ca23b2e5bdb16ae Mon Sep 17 00:00:00 2001 From: Yan Date: Fri, 6 Aug 2021 13:38:08 -0400 Subject: [PATCH] Make use of `loadJson` inside `loadGithubUser` --- 1-js/11-async/03-promise-chaining/article.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/1-js/11-async/03-promise-chaining/article.md b/1-js/11-async/03-promise-chaining/article.md index 78d381a9..4c7d7d7a 100644 --- a/1-js/11-async/03-promise-chaining/article.md +++ b/1-js/11-async/03-promise-chaining/article.md @@ -332,8 +332,7 @@ function loadJson(url) { } function loadGithubUser(name) { - return fetch(`https://api.github.com/users/${name}`) - .then(response => response.json()); + return loadJson(`https://api.github.com/users/${name}`); } function showAvatar(githubUser) {