fix(Step2EnvSetup): update expectedTotal only when API returns a valid value to prevent overwriting existing data
This commit is contained in:
parent
40f7035947
commit
0b71f89f96
1 changed files with 4 additions and 1 deletions
|
|
@ -914,7 +914,10 @@ const fetchProfilesRealtime = async () => {
|
|||
if (res.success && res.data) {
|
||||
const prevCount = profiles.value.length
|
||||
profiles.value = res.data.profiles || []
|
||||
expectedTotal.value = res.data.total_expected
|
||||
// 只有当 API 返回有效值时才更新,避免覆盖已有的有效值
|
||||
if (res.data.total_expected) {
|
||||
expectedTotal.value = res.data.total_expected
|
||||
}
|
||||
|
||||
// 提取实体类型
|
||||
const types = new Set()
|
||||
|
|
|
|||
Loading…
Reference in a new issue