좋은 코드 적용해보기, 성공하는 경우만 다루고 실패하는 경우를 외부에 위임한다.

This commit is contained in:
ByungyeonKim
2021-11-17 04:53:54 +09:00
parent 423105537f
commit 02b982cf71

View File

@@ -26,7 +26,6 @@ async function fetchContents() {
rankingContent: best,
});
console.log(store);
return render();
}
@@ -89,4 +88,8 @@ window.onpopstate = () => {
render();
};
fetchContents();
try {
fetchContents();
} catch (error) {
console.error(error);
}