Skip to content

Commit

Permalink
Discard changes to playground/src/Editor/settings.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser authored Aug 14, 2024
1 parent faf316b commit f97b611
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export async function restore(): Promise<[string, string] | null> {
// Legacy URLs, stored as encoded strings in the hash, like:
// https://play.ruff.rs/#eyJzZXR0aW5nc1NvdXJjZ...
const hash = window.location.hash.slice(1);

if (hash) {
const value = lzstring.decompressFromEncodedURIComponent(
window.location.hash.slice(1),
Expand All @@ -49,12 +48,7 @@ export async function restore(): Promise<[string, string] | null> {

// URLs stored in the database, like:
// https://play.ruff.rs/1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed
let id = window.location.pathname.slice(1);

if (id.startsWith("/")) {
id = id.substring(1);
}

const id = window.location.pathname.slice(1);
if (id) {
const playground = await fetchPlayground(id);
if (playground == null) {
Expand Down

0 comments on commit f97b611

Please sign in to comment.