Commit 45220e31 authored by Kushal Pandya's avatar Kushal Pandya

Use `bind` instead of currying to access outer context

parent 2b6b28da
...@@ -86,15 +86,13 @@ ...@@ -86,15 +86,13 @@
return $.ajax({ return $.ajax({
url: this.buildUrl, url: this.buildUrl,
dataType: 'json', dataType: 'json',
success: (function(_this) { success: function(buildData) {
return function(buildData) { $('.js-build-output').html(buildData.trace_html);
$('.js-build-output').html(buildData.trace_html); if (removeRefreshStatuses.indexOf(buildData.status) >= 0) {
if (removeRefreshStatuses.indexOf(buildData.status) >= 0) { this.initScrollMonitor();
_this.initScrollMonitor(); return $('.js-build-refresh').remove();
return $('.js-build-refresh').remove(); }
} }.bind(this)
};
})(this)
}); });
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment