Skip to content

Commit d1cfedf

Browse files
fix(footer): add SiteLocale type assertion in field resolution
Cast the fallback chain candidate to SiteLocale to satisfy TypeScript index-signature constraints in resolveLocalizedField. Co-Authored-By: Hagicode <noreply@hagicode.com> Signed-off-by: newbe36524 <newbe36524@qq.com>
1 parent 01b3ba2 commit d1cfedf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib/footer-site-links.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function resolveLocalizedField(field: LocalizedFooterField, locale: FooterCatalo
5252
}
5353

5454
for (const candidate of [locale, ...getFooterLocaleFallbackChain(locale)]) {
55-
const value = field[candidate];
55+
const value = field[candidate as SiteLocale];
5656
if (typeof value === 'string' && value.trim().length > 0) {
5757
return value;
5858
}

0 commit comments

Comments
 (0)