diff options
author | Simon Knox <psimyn@gmail.com> | 2017-03-29 17:58:33 +1100 |
---|---|---|
committer | Simon Knox <psimyn@gmail.com> | 2017-04-12 17:04:18 +1000 |
commit | 81c920f13aadf61d072889d1533bb6621868501c (patch) | |
tree | a9d84990fe74441a3afb1a4baea60be63f3c679b | |
parent | a62ae94d9c5940e87679b1ce8a0aee8b82b4d59e (diff) | |
download | gitlab-ce-81c920f13aadf61d072889d1533bb6621868501c.tar.gz |
fix js error in MR remove branch failure handler
-rw-r--r-- | app/assets/javascripts/merged_buttons.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/merged_buttons.js b/app/assets/javascripts/merged_buttons.js index 9548a98f499..a88876d0c24 100644 --- a/app/assets/javascripts/merged_buttons.js +++ b/app/assets/javascripts/merged_buttons.js @@ -1,11 +1,11 @@ /* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, max-len */ (function() { - var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; }; - this.MergedButtons = (function() { function MergedButtons() { - this.removeSourceBranch = bind(this.removeSourceBranch, this); + this.removeSourceBranch = this.removeSourceBranch.bind(this); + this.removeBranchSuccess = this.removeBranchSuccess.bind(this); + this.removeBranchError = this.removeBranchError.bind(this); this.$removeBranchWidget = $('.remove_source_branch_widget'); this.$removeBranchProgress = $('.remove_source_branch_in_progress'); this.$removeBranchFailed = $('.remove_source_branch_widget.failed'); @@ -22,7 +22,7 @@ MergedButtons.prototype.initEventListeners = function() { $(document).on('click', '.remove_source_branch', this.removeSourceBranch); $(document).on('ajax:success', '.remove_source_branch', this.removeBranchSuccess); - return $(document).on('ajax:error', '.remove_source_branch', this.removeBranchError); + $(document).on('ajax:error', '.remove_source_branch', this.removeBranchError); }; MergedButtons.prototype.removeSourceBranch = function() { |