fix(showstart): fix the match condition of city and style (#16394)

This commit is contained in:
lchtao26
2024-08-08 10:13:16 +08:00
committed by GitHub
parent 4e54a006db
commit fc2cf18d18
+2 -2
View File
@@ -173,13 +173,13 @@ async function fetchStyleList(keyword = '') {
async function fetchDictionary(cityCode: string, showStyle: string) {
const resp = await fetchParams();
const target = resp.result.find((item) => item.cityCode === cityCode);
const target = resp.result.find((item) => String(item.cityCode) === cityCode);
if (!target) {
return {};
}
return {
cityName: target.cityName,
showName: target.styles.find((item) => item.key === showStyle)?.showName,
showName: target.styles.find((item) => String(item.key) === showStyle)?.showName,
};
}