File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ function clearLog() {
272
272
type HashData = {
273
273
code: string ;
274
274
};
275
- const hash = ref <string | null >(inBrowser ? null : window .location .hash .slice (1 ) || localStorage .getItem (' ais:playground' ));
275
+ const hash = ref <string | null >(inBrowser ? window .location .hash .slice (1 ) || localStorage .getItem (' ais:playground' ) : null );
276
276
const hashData = computed <HashData | null >(() => {
277
277
if (hash .value == null ) return null ;
278
278
try {
Original file line number Diff line number Diff line change 1
1
<template >
2
- <DefaultTheme .Layout />
3
- <div v-if =" !loaded" :class =" $style.w" ></div >
2
+ <div >
3
+ <DefaultTheme .Layout />
4
+ <div v-if =" !loaded" :class =" $style.w" ></div >
5
+ </div >
4
6
</template >
5
7
6
8
<script setup lang="ts">
@@ -14,7 +16,7 @@ const loaded = ref(false);
14
16
15
17
const locales = Object .keys (data .site .value .locales ) as string [];
16
18
const localesRegex = new RegExp (` ^/(${locales .join (' |' )}) ` );
17
- const savedLocale = localStorage .getItem (' ais:locale' );
19
+ const savedLocale = inBrowser ? localStorage .getItem (' ais:locale' ) : null ;
18
20
19
21
if (inBrowser ) {
20
22
if (! localesRegex .test (route .path )) {
You can’t perform that action at this time.
0 commit comments