diff options
| author | Clement Ho <clemmakesapps@gmail.com> | 2017-05-26 14:26:24 +0000 |
|---|---|---|
| committer | Clement Ho <clemmakesapps@gmail.com> | 2017-05-26 14:26:24 +0000 |
| commit | a59165e7fd1e8001c1d776dd9b5c2428a8f5449e (patch) | |
| tree | caa280e4491cd0f4d888b2d036f7a8f943b34190 /app/assets | |
| parent | ce6d850ef5950430ad928fe34da5c9be9a162c81 (diff) | |
| parent | 07a3a69ca89923aa040b87902fa13af4fe838f88 (diff) | |
| download | gitlab-ce-a59165e7fd1e8001c1d776dd9b5c2428a8f5449e.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
Diffstat (limited to 'app/assets')
| -rw-r--r-- | app/assets/javascripts/merge_request_tabs.js | 2 |
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 22032d0f914..894ed81b044 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({ |
