Merge pull request #2459 from sveltejs/v2-repl-redirect

redirect to old REPL where necessary
pull/2466/head
Rich Harris 6 years ago committed by GitHub
commit bb888f69d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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