Commit 95d53592 authored by Kushal Pandya's avatar Kushal Pandya

ESLint: use outer `this` by currying function

parent ad0b8187
......@@ -81,19 +81,20 @@
};
Build.prototype.getInitialBuildTrace = function() {
var _this = this;
var removeRefreshStatuses = ['success', 'failed', 'canceled', 'skipped']
return $.ajax({
url: this.buildUrl,
dataType: 'json',
success: function(buildData) {
$('.js-build-output').html(buildData.trace_html);
if (removeRefreshStatuses.indexOf(buildData.status) >= 0) {
_this.initScrollMonitor();
return $('.js-build-refresh').remove();
}
}
success: (function(_this) {
return function(buildData) {
$('.js-build-output').html(buildData.trace_html);
if (removeRefreshStatuses.indexOf(buildData.status) >= 0) {
_this.initScrollMonitor();
return $('.js-build-refresh').remove();
}
};
})(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