diff --git a/frontend/src/business/components/api/automation/scenario/MsInputTag.vue b/frontend/src/business/components/api/automation/scenario/MsInputTag.vue index 1838254353..058e525714 100644 --- a/frontend/src/business/components/api/automation/scenario/MsInputTag.vue +++ b/frontend/src/business/components/api/automation/scenario/MsInputTag.vue @@ -71,7 +71,11 @@ export default { this.currentScenario[this.prop] = this.innerTags; }, 'currentScenario.tags'() { - this.innerTags = this.currentScenario.tags + if(Object.prototype.toString.call(this.currentScenario.tags)==="[object String]"){ + this.innerTags = JSON.parse(this.currentScenario.tags); + }else{ + this.innerTags = this.currentScenario.tags + } }, }, methods: { diff --git a/frontend/src/business/components/api/definition/components/EditCompleteContainer.vue b/frontend/src/business/components/api/definition/components/EditCompleteContainer.vue index 713e39a8c3..23e7d6d5c2 100644 --- a/frontend/src/business/components/api/definition/components/EditCompleteContainer.vue +++ b/frontend/src/business/components/api/definition/components/EditCompleteContainer.vue @@ -252,7 +252,7 @@ export default { saveApi(data) { this.$emit("saveApi", data); if (data != null && data.tags != 'null' && data.tags != undefined) { - if (Object.prototype.toString.call(data.tags).match(/\[object (\w+)\]/)[1].toLowerCase() !== 'object') { + if (Object.prototype.toString.call(data.tags)==="[object String]") { data.tags = JSON.parse(data.tags); } }