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

ESLint: use outer `this` by currying function

parent ad0b8187
...@@ -81,19 +81,20 @@ ...@@ -81,19 +81,20 @@
}; };
Build.prototype.getInitialBuildTrace = function() { Build.prototype.getInitialBuildTrace = function() {
var _this = this;
var removeRefreshStatuses = ['success', 'failed', 'canceled', 'skipped'] var removeRefreshStatuses = ['success', 'failed', 'canceled', 'skipped']
return $.ajax({ return $.ajax({
url: this.buildUrl, url: this.buildUrl,
dataType: 'json', dataType: 'json',
success: function(buildData) { success: (function(_this) {
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();
} }
} };
})(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