fix(测试跟踪): 测试计划选择环境控制台报错

--bug=1018425 --user=陈建星 【测试跟踪】测试计划列表,执行测试计划 ,选择环境,console有报错 https://www.tapd.cn/55049933/s/1268339
This commit is contained in:
chenjianxing 2022-10-19 18:16:49 +08:00 committed by jianxing
parent 81c68f23a1
commit 83499ccc15
1 changed files with 5 additions and 3 deletions

View File

@ -102,9 +102,11 @@ export default {
//
let temp = this.data.find(dt => dt.id === id);
temp.envs = envs;
let envId = this.envMap.get(id);
//
temp.selectEnv = envs.filter(e => e.id === envId).length === 0 ? null : envId;
if (this.envMap && this.envMap.size > 0) {
let envId = this.envMap.get(id);
//
temp.selectEnv = envs.filter(e => e.id === envId).length === 0 ? null : envId;
}
});
}
});