Commit 842ce3a0 authored by Chunchi Che's avatar Chunchi Che

fix small

parent 34d53f09
Pipeline #23624 passed with stages
in 18 minutes and 16 seconds
...@@ -16,6 +16,7 @@ export async function initStrings() { ...@@ -16,6 +16,7 @@ export async function initStrings() {
localStorage.setItem(`${region}_${code}`, value); localStorage.setItem(`${region}_${code}`, value);
} catch (error) { } catch (error) {
alert(`set item in local storage error: ${error}`); alert(`set item in local storage error: ${error}`);
break;
} }
} }
} }
...@@ -28,7 +29,7 @@ export enum Region { ...@@ -28,7 +29,7 @@ export enum Region {
} }
export function fetchStrings(region: Region, id: string | number): string { export function fetchStrings(region: Region, id: string | number): string {
return localStorage.getItem(`${region}_${id}`) || ""; return localStorage.getItem(`${region}_${id}`) ?? "";
} }
export function getStrings(description: number): string { export function getStrings(description: number): string {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment