fix(测试跟踪): 测试计划打开性能报告控制台报错

--bug=1018686 --user=李玉号 【测试跟踪】测试计划-查看报告-打开性能报告-Console报错
https://www.tapd.cn/55049933/s/1274477
This commit is contained in:
shiziyuan9527 2022-10-24 16:10:13 +08:00 committed by lyh
parent 2224614fb5
commit a630ccfc95
2 changed files with 3 additions and 3 deletions

View File

@ -187,7 +187,7 @@ export default {
if (currentInstance) {
this.currentInstance = currentInstance;
} else {
this.currentInstance = this.currentInstance || this.instances[0].ip + ":" + this.instances[0].port;
this.currentInstance = this.currentInstance || this.instances[0]?.ip + ":" + this.instances[0]?.port;
}
this.handleChecked(this.currentInstance);
getSharePerformanceMetricQuery(this.shareId, this.id)
@ -210,7 +210,7 @@ export default {
this.showChart = true;
});
} else {
this.currentInstance = this.currentInstance || this.instances[0].ip + ":" + this.instances[0].port;
this.currentInstance = this.currentInstance || this.instances[0]?.ip + ":" + this.instances[0]?.port;
}
this.handleChecked(this.currentInstance);
getPerformanceMetricQuery(this.id).then(result => {

View File

@ -171,7 +171,7 @@ export default {
// this.init = true;
if (this.planReportTemplate) {
this.instances = this.planReportTemplate.reportResource;
this.currentInstance = currentInstance || this.instances[0].ip + ":" + this.instances[0].port;
this.currentInstance = currentInstance || this.instances[0]?.ip + ":" + this.instances[0]?.port;
this.data = this.planReportTemplate.metricData;
this.totalOption = this.getOption(this.currentInstance);
}