Problem
Problem: a task in LegoFlow-SWE (Harbor dataset). In our codebase, we frequently need to access browser‑specific globals like window . However, when the code runs in a server‑side rendering (SSR) environment, direct window access causes a runtime error and breaks the application. We need a helper…
The task
In our codebase, we frequently need to access browser‑specific globals like `window`. However, when the code runs in a server‑side rendering (SSR) environment, direct `window` access causes a runtime error and breaks the application. We need a helper that safely executes code that depends on the `window` object,…
Part of Lego-X/LegoFlow-SWE.