From 8a673e65b815cf25e7000186e92a184ee7ac22a1 Mon Sep 17 00:00:00 2001 From: Michael Rochester Date: Thu, 7 Dec 2023 16:30:19 +0000 Subject: [PATCH] fix(devCDN): prevent mutatation of cache --- src/server/utils/cdnCache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/utils/cdnCache.js b/src/server/utils/cdnCache.js index d8fa014d..26422667 100644 --- a/src/server/utils/cdnCache.js +++ b/src/server/utils/cdnCache.js @@ -97,7 +97,7 @@ const stripVersion = (url) => { }; export const removeExistingEntryIfConflicting = (url, cachedModuleFiles) => { - const updatedCachedModules = cachedModuleFiles; + const updatedCachedModules = { ...cachedModuleFiles }; const strippedUrl = stripVersion(url); const matchingModule = Object.keys(cachedModuleFiles)