redirect to old REPL where necessary

pull/2459/head
Richard Harris 6 years ago
parent 39afa1c153
commit 428e220e3e

@ -1,5 +1,10 @@
<script context="module">
export function preload({ query }) {
if (/^[^>]?[12]/.test(query.version)) {
const search = Object.keys(query).map(key => `${key}=${query[key]}`).join('&');
return this.redirect(302, `https://v2.svelte.dev/repl?${search}`);
}
return {
version: query.version || '3',
gist_id: query.gist,

Loading…
Cancel
Save