summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKushal Pandya <kushal@gitlab.com>2016-12-12 22:05:17 +0530
committerKushal Pandya <kushal@gitlab.com>2016-12-21 13:16:18 +0530
commit45220e310cd12da9bd7b0b07fe3509def063a60c (patch)
treefe688a7ca03fea7dcb7f97aa847ad64b8d4c17eb /app
parent2b6b28da740476c02a7bab2113737458e3e6af30 (diff)
downloadgitlab-ce-45220e310cd12da9bd7b0b07fe3509def063a60c.tar.gz
Use `bind` instead of currying to access outer context
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/build.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/app/assets/javascripts/build.js b/app/assets/javascripts/build.js
index 5c6f0083e57..8646ce99726 100644
--- a/app/assets/javascripts/build.js
+++ b/app/assets/javascripts/build.js
@@ -86,15 +86,13 @@
return $.ajax({
url: this.buildUrl,
dataType: 'json',
- 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)
+ success: function(buildData) {
+ $('.js-build-output').html(buildData.trace_html);
+ if (removeRefreshStatuses.indexOf(buildData.status) >= 0) {
+ this.initScrollMonitor();
+ return $('.js-build-refresh').remove();
+ }
+ }.bind(this)
});
};