add close shortkey

This commit is contained in:
sijinhui
2024-09-13 11:58:03 +08:00
parent 9142cd3303
commit 969558a126
2 changed files with 5 additions and 3 deletions

View File

@@ -85,7 +85,9 @@ merge(fallbackLang, targetLang);
export default fallbackLang as LocaleType;
function getItem(key: string) {
return localStorage.getItem(key);
if (typeof window !== "undefined") {
return localStorage.getItem(key);
}
}
function setItem(key: string, value: string) {