fix(接口测试): 修复包含jsonSchema的数据存为新用例导致页面奔溃的缺陷

https://github.com/metersphere/metersphere/issues/22791
This commit is contained in:
wxg0103 2023-03-16 15:35:57 +08:00 committed by wxg0103
parent f9a916f47f
commit bd0387f1e3
2 changed files with 1 additions and 9 deletions

View File

@ -370,7 +370,7 @@ export default {
setOwnEnvironment(scenarioDefinition) { setOwnEnvironment(scenarioDefinition) {
for (let i in scenarioDefinition) { for (let i in scenarioDefinition) {
let typeArray = ['JDBCPostProcessor', 'JDBCSampler', 'JDBCPreProcessor']; let typeArray = ['JDBCPostProcessor', 'JDBCSampler', 'JDBCPreProcessor'];
if (typeArray.indexOf(scenarioDefinition[i].type) !== -1) { if (typeArray.indexOf(scenarioDefinition[i].type) !== -1 && this.currentScenario) {
scenarioDefinition[i].currentScenarioId = this.currentScenario.id; scenarioDefinition[i].currentScenarioId = this.currentScenario.id;
} }
if (scenarioDefinition[i].hashTree && scenarioDefinition[i].hashTree.length > 0) { if (scenarioDefinition[i].hashTree && scenarioDefinition[i].hashTree.length > 0) {

View File

@ -74,14 +74,6 @@ export default {
} }
this.mock.mock = this.mock.mock + ''; this.mock.mock = this.mock.mock + '';
}, },
watch: {
schema: {
handler(newValue, oldValue) {
this.schema.mock = this.mock;
},
deep: true,
},
},
mounted() {}, mounted() {},
methods: { methods: {
funcSearch(queryString, cb) { funcSearch(queryString, cb) {