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
cf8efb46
Commit
cf8efb46
authored
Aug 19, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use typeof instead of Underscore method
parent
255dbb32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/assets/javascripts/gl_dropdown.js
app/assets/javascripts/gl_dropdown.js
+2
-2
No files found.
app/assets/javascripts/gl_dropdown.js
View file @
cf8efb46
...
@@ -470,7 +470,7 @@
...
@@ -470,7 +470,7 @@
}
else
{
}
else
{
if
(
!
selected
)
{
if
(
!
selected
)
{
value
=
this
.
options
.
id
?
this
.
options
.
id
(
data
)
:
data
.
id
;
value
=
this
.
options
.
id
?
this
.
options
.
id
(
data
)
:
data
.
id
;
fieldName
=
_
.
isFunction
(
this
.
options
.
fieldName
)
?
this
.
options
.
fieldName
()
:
this
.
options
.
fieldName
;
fieldName
=
typeof
this
.
options
.
fieldName
===
'
function
'
?
this
.
options
.
fieldName
()
:
this
.
options
.
fieldName
;
field
=
this
.
dropdown
.
parent
().
find
(
"
input[name='
"
+
fieldName
+
"
'][value='
"
+
value
+
"
']
"
);
field
=
this
.
dropdown
.
parent
().
find
(
"
input[name='
"
+
fieldName
+
"
'][value='
"
+
value
+
"
']
"
);
if
(
field
.
length
)
{
if
(
field
.
length
)
{
...
@@ -545,7 +545,7 @@
...
@@ -545,7 +545,7 @@
selectedObject
=
this
.
renderedData
[
selectedIndex
];
selectedObject
=
this
.
renderedData
[
selectedIndex
];
}
}
}
}
fieldName
=
_
.
isFunction
(
this
.
options
.
fieldName
)
?
this
.
options
.
fieldName
(
selectedObject
)
:
this
.
options
.
fieldName
;
fieldName
=
typeof
this
.
options
.
fieldName
===
'
function
'
?
this
.
options
.
fieldName
(
selectedObject
)
:
this
.
options
.
fieldName
;
value
=
this
.
options
.
id
?
this
.
options
.
id
(
selectedObject
,
el
)
:
selectedObject
.
id
;
value
=
this
.
options
.
id
?
this
.
options
.
id
(
selectedObject
,
el
)
:
selectedObject
.
id
;
if
(
isInput
)
{
if
(
isInput
)
{
field
=
$
(
this
.
el
);
field
=
$
(
this
.
el
);
...
...
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