From a54d9e44a1ac10eaf9328df3597632426e4e7d4f Mon Sep 17 00:00:00 2001 From: Valeria Fadeeva Date: Sun, 10 Dec 2023 01:46:27 +0500 Subject: [PATCH] Update --- public/assets/js/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/assets/js/script.js b/public/assets/js/script.js index fdc938b..38de4a9 100644 --- a/public/assets/js/script.js +++ b/public/assets/js/script.js @@ -76,7 +76,7 @@ async function bodyFetch(url) { let response = await fetch(tplUrl); let body = document.getElementById('body'); - if (tplUrl == 'news.tpl.html') {let res = await fetchData();} + if (tplUrl == 'news.tpl.html') {fetchData();} if (response.ok) { // если HTTP-статус в диапазоне 200-299 // получаем тело ответа (см. про этот метод ниже) @@ -138,7 +138,7 @@ let fetchPage = async function(evt) { const linkText = this.text.trim(); const title = document.title + ": " + linkText; - if (tplUrl == 'news.tpl.html') {let res = await fetchData();} + if (tplUrl == 'news.tpl.html') {fetchData();} try { const response = await fetch(tplUrl, { signal });