fix: handle invalid localization key
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import { AvatarElement, ResolvedAvatarInfo } from "enka.ts";
|
import { AvatarElement, ResolvedAvatarInfo } from "enka.ts";
|
||||||
import { EnkaLocs, EnkaLocsLanguage } from "@/type/enka";
|
import { EnkaLocsLanguage } from "@/type/enka";
|
||||||
import { FightPropMapEnum, PercentageFightProp } from "@/type/fightPropMap";
|
import { FightPropMapEnum, PercentageFightProp } from "@/type/fightPropMap";
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
@@ -195,7 +195,7 @@ export function buildDisplayRows(
|
|||||||
rows.push({
|
rows.push({
|
||||||
id,
|
id,
|
||||||
key: keyName as keyof typeof FightPropMapEnum,
|
key: keyName as keyof typeof FightPropMapEnum,
|
||||||
name: locs[keyName].replace("Max ", ""),
|
name: (locs[keyName] ?? "Unknown").replace("Max ", ""),
|
||||||
value: Number(value),
|
value: Number(value),
|
||||||
formatted: formatValue(keyName, value, PercentageFightProp),
|
formatted: formatValue(keyName, value, PercentageFightProp),
|
||||||
base: computedBase,
|
base: computedBase,
|
||||||
|
|||||||
Reference in New Issue
Block a user