From 47ea64c30ae13e246d5e085f751ec11752a41e86 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 18 Mar 2025 09:26:26 +0000 Subject: [PATCH] [web] operate on shadow-copy of compileResponse.outputFiles (#24330) GitOrigin-RevId: 49336daf11b2a011d03b7469aa4c0ffed72b279a --- .../web/frontend/js/shared/context/local-compile-context.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/shared/context/local-compile-context.tsx b/services/web/frontend/js/shared/context/local-compile-context.tsx index aa4e6d6378..0eb223a5be 100644 --- a/services/web/frontend/js/shared/context/local-compile-context.tsx +++ b/services/web/frontend/js/shared/context/local-compile-context.tsx @@ -383,7 +383,8 @@ export const LocalCompileProvider: FC = ({ children }) => { const outputFiles = new Map() for (const outputFile of data.outputFiles) { - outputFiles.set(outputFile.path, outputFile) + // Use a shadow-copy, we will update it in place and append to .url. + outputFiles.set(outputFile.path, { ...outputFile }) } // set the PDF context