fix(compare): keep chart data when a client refetch fails #12

Merged
tudor merged 1 commits from fix/compare-chart-refetch-resilience into main 2026-07-06 07:27:04 +00:00
Showing only changes of commit 9f8dba227c - Show all commits
+3 -1
View File
@@ -111,8 +111,10 @@ export function ComparisonView({
setComparisonData(data.comparison);
})
.catch((err) => {
// Keep whatever we already have (SSR data or a previous fetch) rather
// than blanking the chart — a transient refetch failure shouldn't
// destroy a working comparison the user is looking at.
console.error('Failed to fetch comparison:', err);
setComparisonData(null);
});
} else {
setComparisonData(null);