From 9bbacbc805daa1a6b4e877ae860d1ff7fc8e3ba1 Mon Sep 17 00:00:00 2001 From: lynn Date: Thu, 13 Apr 2023 19:17:23 +0800 Subject: [PATCH] chore: Should fallback to helloworld tab to show code for old share link (#444) old share link like https://og-playground.vercel.app/?share=VY5BDoIwEEWv0kxi0KTGmuimUXfewCUbYIZShRlSioYQ7i6oG5fvLf77IxSCBBZO6J-qi0NN53FMWamXx1hZleyNWSV6MRV5V8U_lWfFwwXpGWdde6YsbF3I0BPH9fZwRHJaFcE3nbA6mpVWTmokDoILbpKUp2l3AQ3SRi_cgR3hUwZ7MEbDt_kDpLx3YMus7kgDNXL3t6Fd3rNEmUdK4XhtckKwMfQ0TW8 cannot show code correctly. here we set the tab to helloworld by default --- playground/pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playground/pages/index.tsx b/playground/pages/index.tsx index 25cf15f8..dafa915a 100644 --- a/playground/pages/index.tsx +++ b/playground/pages/index.tsx @@ -919,7 +919,7 @@ function ResetCode({ activeCard }: { activeCard: string }) { const decoded = JSON.parse(decompressedData) card = decoded.code overrideOptions = decoded.options - tab = decoded.tab + tab = decoded.tab || 'helloworld' } catch (e) { card = decompressedData }