From d25f8106ffe276bcd09c81fc43a81249dfd5b132 Mon Sep 17 00:00:00 2001 From: RheeseyB <1044774+Rheeseyb@users.noreply.github.com> Date: Wed, 17 Jul 2024 14:26:29 +0100 Subject: [PATCH] Comment out execution scope caching (#6092) **Problem:** The execution scope caching causes issues with CSS and side effecting imports **Fix:** Comment it out until we have a fix **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [x] I could navigate to various routes in Preview mode --- .../ui-jsx-canvas-execution-scope.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/editor/src/components/canvas/ui-jsx-canvas-renderer/ui-jsx-canvas-execution-scope.tsx b/editor/src/components/canvas/ui-jsx-canvas-renderer/ui-jsx-canvas-execution-scope.tsx index 28c442e395c1..7b59e939031c 100644 --- a/editor/src/components/canvas/ui-jsx-canvas-renderer/ui-jsx-canvas-execution-scope.tsx +++ b/editor/src/components/canvas/ui-jsx-canvas-renderer/ui-jsx-canvas-execution-scope.tsx @@ -75,14 +75,15 @@ export function createExecutionScope( editedText: ElementPath | null, ): ExecutionScope { // Return something from the cache as appropriate. - if (lastSeenProjectContents === projectContents) { - if (filePath in executionScopeCache) { - return executionScopeCache[filePath] - } - } else { - lastSeenProjectContents = projectContents - executionScopeCache = {} - } + // FIXME Uncomment when the caching issue is fixed + // if (lastSeenProjectContents === projectContents) { + // if (filePath in executionScopeCache) { + // return executionScopeCache[filePath] + // } + // } else { + lastSeenProjectContents = projectContents + executionScopeCache = {} + // } // Build the scope. const { topLevelElements, imports, jsxFactoryFunction, combinedTopLevelArbitraryBlock } =