summaryrefslogtreecommitdiff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2017-05-26 14:26:24 +0000
committerTimothy Andrew <mail@timothyandrew.net>2017-06-12 08:03:06 +0000
commit0d554df6eb9e1c14060cf6be51d5527fe3f95baa (patch)
treefebbf7abeb260457c0a27614f6c68098b8a47bec /app/assets/javascripts
parent04ba6ae564e406b3bfa244f5bdb4ab80151fbfd3 (diff)
downloadgitlab-ce-0d554df6eb9e1c14060cf6be51d5527fe3f95baa.tar.gz
Merge branch '32888-fix-error-after-missing-note-hash-fragment-in-dom' into 'master'
Fix error thrown with missing note fragment in DOM Closes #32888 See merge request !11700 Conflicts: spec/javascripts/merge_request_tabs_spec.js
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/merge_request_tabs.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js
index c709730f78f..e40d6572b18 100644
--- a/app/assets/javascripts/merge_request_tabs.js
+++ b/app/assets/javascripts/merge_request_tabs.js
@@ -285,7 +285,7 @@ import BlobForkSuggestion from './blob/blob_fork_suggestion';
// Similar to `toggler_behavior` in the discussion tab
const hash = window.gl.utils.getLocationHash();
const anchor = hash && $container.find(`[id="${hash}"]`);
- if (anchor) {
+ if (anchor && anchor.length > 0) {
const notesContent = anchor.closest('.notes_content');
const lineType = notesContent.hasClass('new') ? 'new' : 'old';
notes.toggleDiffNote({