From dbc3ac59d481c03908c5898c4d9cae229f07f828 Mon Sep 17 00:00:00 2001 From: Trirst <abeces968@gmail.com> Date: Sat, 16 Oct 2021 15:58:05 +0700 Subject: [PATCH] Revert fetchAPI helper function --- src/static/js/helper.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/static/js/helper.js b/src/static/js/helper.js index 8c210f4..02e9aa4 100644 --- a/src/static/js/helper.js +++ b/src/static/js/helper.js @@ -1,10 +1,6 @@ async function fetchAPI(endpoint, options) { const res = await fetch(endpoint, options); - const contentType = res.headers.get('content-length'); - let data - if (!contentType.includes("0")) { - data = await res.json(); - } + const data = await res.json(); if (res.ok) { return data; } -- GitLab