From 7fb7dc74924949db398fdcc28224859b1b02291f Mon Sep 17 00:00:00 2001 From: zwjamnsss Date: Fri, 8 Sep 2017 10:42:16 +0800 Subject: [PATCH] fix: postman bug --- client/components/Postman/Postman.js | 2 +- .../Project/Interface/InterfaceCol/InterfaceColContent.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/components/Postman/Postman.js b/client/components/Postman/Postman.js index 30e704af..bb87d31f 100644 --- a/client/components/Postman/Postman.js +++ b/client/components/Postman/Postman.js @@ -474,7 +474,7 @@ export default class Run extends Component { const { method, domains, pathParam, pathname, query, headers, bodyForm, caseEnv, bodyType, resHeader, loading, validRes } = this.state; const hasPlugin = this.state.hasPlugin; let isResJson = false; - Object.keys(resHeader).map(key => { + resHeader && Object.keys(resHeader).map(key => { if (/content-type/i.test(key) && /application\/json/i.test(resHeader[key])) { isResJson = true; } diff --git a/client/containers/Project/Interface/InterfaceCol/InterfaceColContent.js b/client/containers/Project/Interface/InterfaceCol/InterfaceColContent.js index 02cb5a3a..6f37c705 100644 --- a/client/containers/Project/Interface/InterfaceCol/InterfaceColContent.js +++ b/client/containers/Project/Interface/InterfaceCol/InterfaceColContent.js @@ -74,7 +74,10 @@ export default class InterfaceColContent extends Component { const columns = [{ title: '用例名称', dataIndex: 'casename', - key: 'casename' + key: 'casename', + render: (text, item)=>{ + return {text} + } }, { title: '接口路径', dataIndex: 'path',