Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
85e2b184
Commit
85e2b184
authored
Nov 15, 2019
by
minghuan lei
Committed by
Martin Wortschack
Nov 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Remove IIFEs from new_branch_form.js"
parent
7f4453f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
app/assets/javascripts/new_branch_form.js
app/assets/javascripts/new_branch_form.js
+8
-10
changelogs/unreleased/34610-Remove-IIFEs-from-new_branch_form-js.yml
...unreleased/34610-Remove-IIFEs-from-new_branch_form-js.yml
+5
-0
No files found.
app/assets/javascripts/new_branch_form.js
View file @
85e2b184
...
...
@@ -72,16 +72,14 @@ export default class NewBranchForm {
});
return
`
${
restriction
.
prefix
}
${
formatted
.
join
(
restriction
.
conjunction
)}
`
;
};
const
validator
=
(
function
(
_this
)
{
return
function
(
errors
,
restriction
)
{
const
matched
=
_this
.
name
.
val
().
match
(
restriction
.
pattern
);
if
(
matched
)
{
return
errors
.
concat
(
formatter
(
matched
.
reduce
(
unique
,
[]),
restriction
));
}
else
{
return
errors
;
}
};
})(
this
);
const
validator
=
(
errors
,
restriction
)
=>
{
const
matched
=
this
.
name
.
val
().
match
(
restriction
.
pattern
);
if
(
matched
)
{
return
errors
.
concat
(
formatter
(
matched
.
reduce
(
unique
,
[]),
restriction
));
}
else
{
return
errors
;
}
};
const
errors
=
this
.
restrictions
.
reduce
(
validator
,
[]);
if
(
errors
.
length
>
0
)
{
const
errorMessage
=
$
(
'
<span/>
'
).
text
(
errors
.
join
(
'
,
'
));
...
...
changelogs/unreleased/34610-Remove-IIFEs-from-new_branch_form-js.yml
0 → 100644
View file @
85e2b184
---
title
:
Remove IIFEs from new_branch_form.js
merge_request
:
20009
author
:
minghuan lei
type
:
other
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment