diff --git a/nextjs-app/components/ComparisonView.tsx b/nextjs-app/components/ComparisonView.tsx index 047d3b5..e1f929d 100644 --- a/nextjs-app/components/ComparisonView.tsx +++ b/nextjs-app/components/ComparisonView.tsx @@ -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);