Update
This commit is contained in:
		
							parent
							
								
									d3cd5b77c5
								
							
						
					
					
						commit
						162be52f1d
					
				|  | @ -81,7 +81,7 @@ async function bodyFetch(url) { | |||
|     if (response.ok) { // если HTTP-статус в диапазоне 200-299
 | ||||
|         // получаем тело ответа (см. про этот метод ниже)
 | ||||
|         let text = await response.text(); | ||||
|         if (tplUrl == 'news.tpl.html') {fetchData();} | ||||
|         if (tplUrl == 'news.tpl.html') {await fetchData();} | ||||
|         body.innerHTML = text; | ||||
|     } else { | ||||
|         body.innerHTML = "Ой всё сломалось :("; | ||||
|  | @ -142,7 +142,7 @@ let fetchPage = async function(evt) { | |||
|     try { | ||||
|         const response = await fetch(tplUrl, { signal }); | ||||
|         text = await response.text(); | ||||
|         if (tplUrl == 'news.tpl.html') {fetchData();} | ||||
|         if (tplUrl == 'news.tpl.html') {await fetchData();} | ||||
|     } catch (error) { | ||||
|         // DOMException: The user aborted a request.
 | ||||
|         console.log('Error: ', error) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue