mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-11 18:10:49 +08:00
fix(settings): bug
- 移除空值转换
This commit is contained in:
@@ -79,15 +79,7 @@ async function loadSiteSettings() {
|
||||
// 将API返回的值赋值给SystemSettings
|
||||
for (const sectionKey of Object.keys(siteSetting.value) as Array<keyof typeof siteSetting.value>) {
|
||||
Object.keys(siteSetting.value[sectionKey]).forEach((key: string) => {
|
||||
let v: any
|
||||
if (result.data.hasOwnProperty(key)) {
|
||||
v = result.data[key]
|
||||
// 空字符串转为null,避免空字符串导致前端显示问题
|
||||
if (v === '') {
|
||||
v = null
|
||||
}
|
||||
;(siteSetting.value[sectionKey] as any)[key] = v
|
||||
}
|
||||
if (result.data.hasOwnProperty(key)) (SystemSettings.value[sectionKey] as any)[key] = result.data[key]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user