From fa11557b2c8b1d808c054338564c257c5b4c3ceb Mon Sep 17 00:00:00 2001 From: zhangdahai112 <46101698+zhangdahai112@users.noreply.github.com> Date: Tue, 22 Feb 2022 16:39:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20request=20body=20=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/definition/components/EditCompleteContainer.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/business/components/api/definition/components/EditCompleteContainer.vue b/frontend/src/business/components/api/definition/components/EditCompleteContainer.vue index 5022faa066..c2d654283a 100644 --- a/frontend/src/business/components/api/definition/components/EditCompleteContainer.vue +++ b/frontend/src/business/components/api/definition/components/EditCompleteContainer.vue @@ -219,7 +219,7 @@ export default { if (this.currentApi.request != null && this.currentApi.request != 'null' && this.currentApi.request != undefined) { if (Object.prototype.toString.call(this.currentApi.request).match(/\[object (\w+)\]/)[1].toLowerCase() !== 'object') { this.currentApi.request = JSON.parse(this.currentApi.request); - if (!this.currentApi.request.body.type) { + if (this.currentApi.request.body && !this.currentApi.request.body.type) { let tempRequest = _.cloneDeep(this.currentApi.request); tempRequest.body = {type: null}; this.currentApi.request = tempRequest;