diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-15 12:06:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-15 12:06:06 +0000 |
commit | fc96671f817239041ba2747af835a8d5d9aa3739 (patch) | |
tree | 19c7f650c869033760850b0d0edd4fb0a10968c4 /app/assets/javascripts/templates/issuable_template_selector.js | |
parent | 3d13802bc2c9400ea33defdd43bff6d904ee9c4d (diff) | |
download | gitlab-ce-fc96671f817239041ba2747af835a8d5d9aa3739.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/templates/issuable_template_selector.js')
-rw-r--r-- | app/assets/javascripts/templates/issuable_template_selector.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/templates/issuable_template_selector.js b/app/assets/javascripts/templates/issuable_template_selector.js index 78a1c4fa8a8..10ad4170930 100644 --- a/app/assets/javascripts/templates/issuable_template_selector.js +++ b/app/assets/javascripts/templates/issuable_template_selector.js @@ -31,7 +31,8 @@ export default class IssuableTemplateSelector extends TemplateSelector { }); this.templateWarningEl.find('.js-close-btn').on('click', () => { - if (this.previousSelectedIndex) { + // Explicitly check against 0 value + if (this.previousSelectedIndex !== undefined) { this.dropdown.data('glDropdown').selectRowAtIndex(this.previousSelectedIndex); } else { this.reset(); @@ -109,6 +110,7 @@ export default class IssuableTemplateSelector extends TemplateSelector { } else { this.setEditorContent(this.currentTemplate, { skipFocus: false }); } + return; } } |