Fix build
This commit is contained in:
@@ -38,7 +38,9 @@ export async function getStaticProps({
|
|||||||
type: 'single',
|
type: 'single',
|
||||||
stigmataData: stigmataData,
|
stigmataData: stigmataData,
|
||||||
stigmataSetList: (
|
stigmataSetList: (
|
||||||
getStigmataListBySetId(stigmataData.set!, locale) || []
|
(stigmataData.set != null &&
|
||||||
|
getStigmataListBySetId(stigmataData.set!, locale)) ||
|
||||||
|
[]
|
||||||
).sort((a, b) => -a.type.localeCompare(b.type)),
|
).sort((a, b) => -a.type.localeCompare(b.type)),
|
||||||
stigmataSet: getStigmataSetBySetId(stigmataData.set!, locale) || null,
|
stigmataSet: getStigmataSetBySetId(stigmataData.set!, locale) || null,
|
||||||
...(await getI18NProps(locale)),
|
...(await getI18NProps(locale)),
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export function getSignetGroupById(id: string, locale = 'en-US') {
|
|||||||
let cachedSupports: any = null
|
let cachedSupports: any = null
|
||||||
|
|
||||||
export function getSupportBattlesuits(locale?: string): SupportBattlesuit[] {
|
export function getSupportBattlesuits(locale?: string): SupportBattlesuit[] {
|
||||||
if (cachedSignetGroupMap == null) {
|
if (cachedSupports == null) {
|
||||||
cachedSupports = yaml.parse(
|
cachedSupports = yaml.parse(
|
||||||
fs
|
fs
|
||||||
.readFileSync(
|
.readFileSync(
|
||||||
@@ -97,7 +97,7 @@ export function getSupportBattlesuits(locale?: string): SupportBattlesuit[] {
|
|||||||
let cachedSigils: any = null
|
let cachedSigils: any = null
|
||||||
|
|
||||||
export function getRemembranceSigils(locale?: string): RemembranceSigil[] {
|
export function getRemembranceSigils(locale?: string): RemembranceSigil[] {
|
||||||
if (cachedSignetGroupMap == null) {
|
if (cachedSigils == null) {
|
||||||
cachedSigils = yaml.parse(
|
cachedSigils = yaml.parse(
|
||||||
fs
|
fs
|
||||||
.readFileSync(path.join(process.cwd(), 'data/honkai3rd/er-sigils.yaml'))
|
.readFileSync(path.join(process.cwd(), 'data/honkai3rd/er-sigils.yaml'))
|
||||||
|
|||||||
@@ -120,9 +120,11 @@ export function getStigmataSetBySetId(setId: string, locale?: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getStigmataListBySetId(setId: string, locale?: string) {
|
export function getStigmataListBySetId(setId: string, locale?: string) {
|
||||||
return ['top', 'mid', 'bot'].map((type) => {
|
return ['top', 'mid', 'bot']
|
||||||
return getStigmaById(setId + '-' + type, locale)!
|
.map((type) => {
|
||||||
})
|
return getStigmaById(setId + '-' + type, locale)!
|
||||||
|
})
|
||||||
|
.filter((stigma) => stigma != null)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getStigmataMapByIds(idList: string[], locale?: string) {
|
export function getStigmataMapByIds(idList: string[], locale?: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user