Skip to content

Commit

Permalink
Merge pull request #108 from 500tech/fix/edit-request-from-captured-r…
Browse files Browse the repository at this point in the history
…equests

Fix a bug where a mocked request wouldn't show edit button
  • Loading branch information
borisd committed Dec 23, 2015
2 parents c2d237d + 883aff3 commit eed200d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ui/components/captured-requests.js
Expand Up @@ -43,8 +43,8 @@ export class CapturedRequests extends React.Component {
}

_actionButtonFor(request) {
return this._isAlreadyMocked(request)
? <button className="btn btn-edit" onClick={ this._editRequest.bind(this, this._getMockedRequest(request).id) }>Edit</button>
return this._isAlreadyMocked.bind(this, request)()
? <button className="btn btn-edit" onClick={ this._editRequest.bind(this, request.id) }>Edit</button>
: <button className="btn btn-mock" onClick={ this._mockRequest.bind(this, request) }>Mock</button>;
}

Expand Down

0 comments on commit eed200d

Please sign in to comment.