diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-10-14 14:55:40 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-10-14 15:01:25 -0400 |
commit | fc0d92746d8a228077c6602be1f77b679f5d196a (patch) | |
tree | f98a24db92deaabd31cde9e04aabd190a6bb04e8 /lib/api/project_snippets.rb | |
parent | 2fb02f9252f3083b44d1999a8421b3824e1929cb (diff) | |
download | gitlab-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