From 0d772ff3d47af54717451c498b710cd852e07d19 Mon Sep 17 00:00:00 2001 From: martin-mfg <2026226+martin-mfg@users.noreply.github.com> Date: Fri, 26 Dec 2025 12:47:00 +0100 Subject: [PATCH] fix cloning problem --- backend/src/fetchers/stats.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/fetchers/stats.js b/backend/src/fetchers/stats.js index 3e12e7dc..e5234064 100644 --- a/backend/src/fetchers/stats.js +++ b/backend/src/fetchers/stats.js @@ -148,8 +148,11 @@ const statsFetcher = async ({ const repoNodes = res.data.data.user.repositories.nodes; if (stats) { if (fetchedPages === 1) { - // make deep copy of stats to avoid altering the cached response object in frontend - stats = structuredClone(stats); + // make deep copy of relevant stats fields to avoid altering the cached response object in frontend + stats = structuredClone({ + data: stats.data, + statusText: stats.statusText, + }); } stats.data.data.user.repositories.nodes.push(...repoNodes); } else {