Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-05-08 22:25:12 +0300
committerMike Greiling <mike@pixelcog.com>2017-05-09 01:40:24 +0300
commitf6d214e17e134e0cb868eb9cff021d8cfc1e88bf (patch)
tree171262e1f9ce052cd79c71d1f31f254efa211991 /app/assets/javascripts/new_branch_form.js
parente0c6ea8798ccc090224164223fbe32818c47336d (diff)
remove unnecessary indexOf polyfills
Diffstat (limited to 'app/assets/javascripts/new_branch_form.js')
-rw-r--r--app/assets/javascripts/new_branch_form.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/new_branch_form.js b/app/assets/javascripts/new_branch_form.js
index c4733253af8..9d614cdee3a 100644
--- a/app/assets/javascripts/new_branch_form.js
+++ b/app/assets/javascripts/new_branch_form.js
@@ -1,7 +1,5 @@
/* eslint-disable func-names, space-before-function-paren, no-var, one-var, prefer-rest-params, max-len, vars-on-top, wrap-iife, consistent-return, comma-dangle, one-var-declaration-per-line, quotes, no-return-assign, prefer-arrow-callback, prefer-template, no-shadow, no-else-return, max-len, object-shorthand */
(function() {
- var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i += 1) { if (i in this && this[i] === item) return i; } return -1; };
-
this.NewBranchForm = (function() {
function NewBranchForm(form, availableRefs) {
this.validate = this.validate.bind(this);
@@ -94,6 +92,8 @@
NewBranchForm.prototype.validate = function() {
var errorMessage, errors, formatter, unique, validator;
+ const indexOf = [].indexOf;
+
this.branchNameError.empty();
unique = function(values, value) {
if (indexOf.call(values, value) === -1) {