Reset loading and scroll state in fetchData catch blocks to prevent stuck UI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 23:23:05 +08:00
parent dd5096b10b
commit 2f0728280c
2 changed files with 4 additions and 0 deletions

View File

@@ -456,6 +456,8 @@ async function fetchData() {
isLoading.value = false; isLoading.value = false;
} catch (error) { } catch (error) {
console.error("Failed to load data:", error); console.error("Failed to load data:", error);
infiniteFinish.value = true;
isLoading.value = false;
} }
} }

View File

@@ -353,6 +353,8 @@ async function fetchData() {
isLoading.value = false; isLoading.value = false;
} catch (error) { } catch (error) {
console.error("Failed to load data:", error); console.error("Failed to load data:", error);
infiniteFinish.value = true;
isLoading.value = false;
} }
} }