소스 검색

[web] operate on shadow-copy of compileResponse.outputFiles (#24330)

GitOrigin-RevId: 49336daf11b2a011d03b7469aa4c0ffed72b279a
Jakob Ackermann 1 년 전
부모
커밋
47ea64c30a
1개의 변경된 파일과 2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      services/web/frontend/js/shared/context/local-compile-context.tsx

+ 2 - 1
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