Commit 8be3d120 authored by Stan Hu's avatar Stan Hu

Merge branch 'fix-notes-refresh-relative-url' into 'master'

Fix live notes refresh in relative URL deployments

### What does this MR do?

This MR fixes URLs used for refreshing notes--the relative_url prefix was appended twice

### Why was this MR needed?

In case of `relative_url` installation, opening a page which does refresh notes (i.e. merge request), the page generates lots of 404 errors in the browser console. It turns out that the relative_url is prepended to the link twice.

Supersedes !233

See merge request !1048
parents 4a76cbe2 dfe78076
Please view this file on the master branch, on stable branches it's out of date. Please view this file on the master branch, on stable branches it's out of date.
v 7.14.0 (unreleased) v 7.14.0 (unreleased)
- Fix URL used for refreshing notes if relative_url is present (Bartłomiej Święcki)
- Fix Error 500 when browsing projects with no HEAD (Stan Hu) - Fix Error 500 when browsing projects with no HEAD (Stan Hu)
- Fix full screen mode for snippet comments (Daniel Gerhardt) - Fix full screen mode for snippet comments (Daniel Gerhardt)
- Fix 404 error in files view after deleting the last file in a repository (Stan Hu) - Fix 404 error in files view after deleting the last file in a repository (Stan Hu)
......
...@@ -10,7 +10,6 @@ class @Notes ...@@ -10,7 +10,6 @@ class @Notes
constructor: (notes_url, note_ids, last_fetched_at, view) -> constructor: (notes_url, note_ids, last_fetched_at, view) ->
@notes_url = notes_url @notes_url = notes_url
@notes_url = gon.relative_url_root + @notes_url if gon.relative_url_root?
@note_ids = note_ids @note_ids = note_ids
@last_fetched_at = last_fetched_at @last_fetched_at = last_fetched_at
@view = view @view = view
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment