sveltejs / sites

Monorepo for the sites in the Svelte ecosystem
https://svelte.dev
MIT License
286 stars 123 forks source link

(fix) loading files from repl json broke the REPL upon renaming #506

Closed paoloricciuti closed 1 year ago

paoloricciuti commented 1 year ago

When loading the files from a saved REPL renaming a file broke the REPL because selecting a new tab was storing the state from App.svelte for the newly selected file in the EDITOR_STATE_MAP. Given that the state includes the document itself after renaming the file the editor restored the state with the wrong doc.

See this REPL as an example, trying to rename ItemTypeOne substitute the content of ItemTypeOne.svelte with the one from App.svelte https://svelte.dev/repl/d9d167fa8ded478ba4dea62257d75a10?version=3.8.0

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hn ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2023 3:38pm