mirror of https://github.com/docker/docs.git
Change normal function in to a ES6 arrow function.
No need for `.bind(this)` with ECMAScript6 syntax! Signed-off-by: Kristján Oddsson <koddsson@gmail.com>
This commit is contained in:
parent
603b9c5952
commit
6e56c4f665
|
@ -31,11 +31,11 @@ var ImageCard = React.createClass({
|
|||
handleTagOverlayClick: function (name) {
|
||||
var $tagOverlay = $(this.getDOMNode()).find('.tag-overlay');
|
||||
$tagOverlay.fadeIn(300);
|
||||
$.get('https://registry.hub.docker.com/v1/repositories/' + name + '/tags', function (result) {
|
||||
$.get('https://registry.hub.docker.com/v1/repositories/' + name + '/tags', result => {
|
||||
this.setState({
|
||||
tags: result
|
||||
});
|
||||
}.bind(this));
|
||||
});
|
||||
},
|
||||
handleCloseTagOverlay: function () {
|
||||
var $tagOverlay = $(this.getDOMNode()).find('.tag-overlay');
|
||||
|
@ -51,12 +51,12 @@ var ImageCard = React.createClass({
|
|||
util.exec(['open', $repoUri + this.props.image.name]);
|
||||
},
|
||||
componentDidMount: function() {
|
||||
$.get('https://registry.hub.docker.com/v1/repositories/' + this.props.image.name + '/tags', function (result) {
|
||||
$.get('https://registry.hub.docker.com/v1/repositories/' + this.props.image.name + '/tags', result => {
|
||||
this.setState({
|
||||
tags: result,
|
||||
chosenTag: result[0].name
|
||||
});
|
||||
}.bind(this));
|
||||
});
|
||||
},
|
||||
render: function () {
|
||||
var self = this;
|
||||
|
|
Loading…
Reference in New Issue