Skip to content

Commit 0952c73

Browse files
authored
fix: properly resolve saved REPLs (#341)
fixes #319
1 parent 3576454 commit 0952c73

File tree

1 file changed

+6
-2
lines changed
  • apps/svelte.dev/src/routes/(authed)/playground/api/[id].json

1 file changed

+6
-2
lines changed

apps/svelte.dev/src/routes/(authed)/playground/api/[id].json/+server.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ export async function GET({ fetch, params }) {
5656
// @ts-ignore
5757
owner: app.userid,
5858
relaxed: false,
59-
// @ts-expect-error app.files has a `source` property
60-
components: munge(app.files)
59+
components: app.files!.map((file) => {
60+
const dot = file.name.lastIndexOf('.');
61+
let name = file.name.slice(0, dot);
62+
let type = file.name.slice(dot + 1);
63+
return { name, type, source: file.source };
64+
})
6165
});
6266
}
6367

0 commit comments

Comments
 (0)