Skip to content

Commit

Permalink
fix fatal error on API edit
Browse files Browse the repository at this point in the history
  • Loading branch information
Bosn committed Jul 18, 2019
1 parent 576b956 commit f307f43
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
8 changes: 1 addition & 7 deletions src/components/common/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,9 @@ import { RootState } from 'actions/types'
const Footer = ({ counter = {} }: { counter: any }) => (
<div className="Footer">
{counter && counter.version}
{/* <span className='ml10 mr10 color-c'>|</span>
{counter.users} 人正在使用 RAP
<span className='ml10 mr10 color-c'>|</span>
今日 Mock 服务被调用 {counter.mock} 次 */}
<ul className="friend_links">
<li><a href="http://rap.alibaba-inc.com/" target="_blank" rel="noopener noreferrer">RAP0.x</a></li>
<li><a href="https://github.com/thx/rap2-delos" target="_blank" rel="noopener noreferrer">GitHub</a></li>
<li><a href="http://mockjs.com/" target="_blank" rel="noopener noreferrer">Mock.js</a></li>
<li><a href="https://thx.github.io/" target="_blank" rel="noopener noreferrer">THX</a></li>
<li><a href="https://fe.alimama.net/thx/30/" target="_blank" rel="noopener noreferrer">MMFE</a></li>
</ul>
</div>
)
Expand Down
2 changes: 2 additions & 0 deletions src/components/editor/InterfaceEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,15 @@ class InterfaceEditor extends Component<
itf={this.state.itf}
bodyOption={this.state.summaryState.bodyOption}
requestParamsType={this.state.summaryState.requestParamsType}
handleChangeProperty={this.handleChangeProperty}
/>
<ResponsePropertyList
properties={this.state.properties}
editable={editable}
repository={repository}
mod={mod}
itf={this.state.itf}
handleChangeProperty={this.handleChangeProperty}
/>
<RModal
when={this.state.moveInterfaceDialogOpen}
Expand Down
2 changes: 1 addition & 1 deletion src/components/editor/PropertyList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class PropertyList extends Component<any, any> {
this.setState({ previewer: !this.state.previewer })
}
handleChangePropertyField = (id: any, key: any, value: any) => {
const { handleChangeProperty } = this.context
const { handleChangeProperty } = this.props
const { properties } = this.props
const property = properties.find((property: any) => property.id === id)
handleChangeProperty({ ...property, [key]: value })
Expand Down

0 comments on commit f307f43

Please sign in to comment.