summaryrefslogtreecommitdiff
path: root/lib/api/project_snippets.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-10-14 14:55:40 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-10-14 15:01:25 -0400
commitfc0d92746d8a228077c6602be1f77b679f5d196a (patch)
treef98a24db92deaabd31cde9e04aabd190a6bb04e8 /lib/api/project_snippets.rb
parent2fb02f9252f3083b44d1999a8421b3824e1929cb (diff)
downloadgitlab-ce-fc0d92746d8a228077c6602be1f77b679f5d196a.tar.gz
Prevent a JS error in MergeRequestTabsrs-mr-tabs-scroll
When `window.location.hash` is pointing to a note, e.g. `#note_1234`, `scrollToElement` would throw an error because a selector such as `.commits #note_1234` doesn't exist, so `offset()` returned `undefined`. This error would prevent subsequent calls from running, which caused the loading spinner to never be hidden. Now we ensure the selector returns a valid element before trying to scroll to it.
Diffstat (limited to 'lib/api/project_snippets.rb')
0 files changed, 0 insertions, 0 deletions