mirror of https://github.com/astral-sh/ruff
## Summary On page load, the playground very briefly flickers a JSON parse error. Due to our use of `useDeferredValue`, we attempt to parse the empty JSON string settings, since after `const initialized = ruffVersion != null;` returns true, we get one render with the stale deferred value. This PR refactors the state, such that we start by storing `null` for the `Source`, and use the `Source` itself to determine initialization status. ## Test Plan Set a breakpoint in the `catch` path in `Editor`; verified that it no longer triggers on load (but did on `main`). |
||
|---|---|---|
| .. | ||
| Editor | ||
| constants.ts | ||
| index.css | ||
| main.tsx | ||
| third-party.d.ts | ||
| vite-env.d.ts | ||