Commit 8c36d490 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch 'ss/fix-milestone-dropdown-error' into 'master'

Resolve no search result click causing issue

See merge request gitlab-org/gitlab!32698
parents 43a1ed9c efb7d43d
......@@ -130,10 +130,13 @@ export default class MilestoneSelect {
fieldName: $dropdown.data('fieldName'),
text: milestone => escape(milestone.title),
id: milestone => {
if (!useId && !$dropdown.is('.js-issuable-form-dropdown')) {
return milestone.name;
if (milestone !== undefined) {
if (!useId && !$dropdown.is('.js-issuable-form-dropdown')) {
return milestone.name;
}
return milestone.id;
}
return milestone.id;
},
hidden: () => {
$selectBox.hide();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment