We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12b99d2 commit ff49dc6Copy full SHA for ff49dc6
src/app.tsx
@@ -30,13 +30,16 @@ export default function App() {
30
) ?? '<?php\n// example code\nphpinfo();';
31
32
const currentVersion =
33
- asVersion(searchParams.get('v')) ?? versions[versions.length - 1];
+ asVersion(searchParams.get('v')) ?? '8.2';
34
35
function updateVersion(v: Version) {
36
const currentState = history.state as UrlState | null;
37
const code = lzstring.decompressFromEncodedURIComponent(
38
currentState?.c ?? initCode
39
);
40
+ if (code == null) {
41
+ return;
42
+ }
43
setSearchParams({
44
v: v,
45
c: lzstring.compressToEncodedURIComponent(code),
0 commit comments