When the database history is empty. the index page doesn't load correctly.

This commit is contained in:
Abdulmhsen B. A. A.
2024-06-07 21:47:44 +03:00
parent fe0440f01a
commit 22929f9f4e

View File

@@ -124,8 +124,9 @@ const logs = ref([])
const loadContent = async () => {
try {
const response = await request(`/history?perpage=6`)
const json = await response.json();
lastHistory.value = json.history
if (response.ok) {
lastHistory.value = await response.json()
}
} catch (e) {
}