diff --git a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue index b237e64fd9..8e0f786a2c 100644 --- a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue +++ b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue @@ -370,7 +370,7 @@ export default { setOwnEnvironment(scenarioDefinition) { for (let i in scenarioDefinition) { 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; } if (scenarioDefinition[i].hashTree && scenarioDefinition[i].hashTree.length > 0) { diff --git a/api-test/frontend/src/business/commons/json-schema/schema/editor/mock/MockComplete.vue b/api-test/frontend/src/business/commons/json-schema/schema/editor/mock/MockComplete.vue index e1ea472ff2..ccd571ed3d 100644 --- a/api-test/frontend/src/business/commons/json-schema/schema/editor/mock/MockComplete.vue +++ b/api-test/frontend/src/business/commons/json-schema/schema/editor/mock/MockComplete.vue @@ -74,14 +74,6 @@ export default { } this.mock.mock = this.mock.mock + ''; }, - watch: { - schema: { - handler(newValue, oldValue) { - this.schema.mock = this.mock; - }, - deep: true, - }, - }, mounted() {}, methods: { funcSearch(queryString, cb) {