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