mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2025-10-30 14:17:55 +00:00
Fix magic rarity item name parse in "cmn-Hant" language (#460)
* Fix magic rarity item name parse in "cmn-Hant" language * Add by translated when ref is null --------- Co-authored-by: kvan7 <kvan.valve@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ITEM_BY_REF } from "@/assets/data";
|
||||
import { ITEM_BY_REF, ITEM_BY_TRANSLATED } from "@/assets/data";
|
||||
import { AppConfig } from "@/web/Config";
|
||||
|
||||
export function magicBasetype(name: string) {
|
||||
@@ -16,7 +16,9 @@ export function magicBasetype(name: string) {
|
||||
|
||||
const result = perm
|
||||
.map((name) => {
|
||||
const result = ITEM_BY_REF("ITEM", name);
|
||||
// HACK: Remember to remove "by translated" when controller copy is fixed
|
||||
const result =
|
||||
ITEM_BY_REF("ITEM", name) ?? ITEM_BY_TRANSLATED("ITEM", name);
|
||||
return { name, found: result && result[0].craftable };
|
||||
})
|
||||
.filter((res) => res.found)
|
||||
|
||||
Reference in New Issue
Block a user