File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ function clearLog() {
272272type HashData = {
273273 code: string ;
274274};
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 );
276276const hashData = computed <HashData | null >(() => {
277277 if (hash .value == null ) return null ;
278278 try {
Original file line number Diff line number Diff line change 11<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 >
46</template >
57
68<script setup lang="ts">
@@ -14,7 +16,7 @@ const loaded = ref(false);
1416
1517const locales = Object .keys (data .site .value .locales ) as string [];
1618const localesRegex = new RegExp (` ^/(${locales .join (' |' )}) ` );
17- const savedLocale = localStorage .getItem (' ais:locale' );
19+ const savedLocale = inBrowser ? localStorage .getItem (' ais:locale' ) : null ;
1820
1921if (inBrowser ) {
2022 if (! localesRegex .test (route .path )) {
You can’t perform that action at this time.
0 commit comments