diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-12-04 20:18:45 -0600 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-12-07 11:19:37 -0600 |
commit | e6ac6734c2f636d3d063718a95ba1169e299b51f (patch) | |
tree | 5ebb145da1c9f9f242b13ca3ccfdcc176766c3e3 /app/assets/javascripts/notes/index.js | |
parent | 9dffd0ab6b2e9f5b0db55230d8991f50a01f7669 (diff) | |
download | gitlab-ce-e6ac6734c2f636d3d063718a95ba1169e299b51f.tar.gz |
Use relative _path helper URLs in the GitLab UI40825-use-relative-path-urls
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/40825
Diffstat (limited to 'app/assets/javascripts/notes/index.js')
-rw-r--r-- | app/assets/javascripts/notes/index.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes/index.js b/app/assets/javascripts/notes/index.js index 8d74c5de5cf..a94163a5f87 100644 --- a/app/assets/javascripts/notes/index.js +++ b/app/assets/javascripts/notes/index.js @@ -8,10 +8,18 @@ document.addEventListener('DOMContentLoaded', () => new Vue({ }, data() { const notesDataset = document.getElementById('js-vue-notes').dataset; + const parsedUserData = JSON.parse(notesDataset.currentUserData); + const currentUserData = parsedUserData ? { + id: parsedUserData.id, + name: parsedUserData.name, + username: parsedUserData.username, + avatar_url: parsedUserData.avatar_path || parsedUserData.avatar_url, + path: parsedUserData.path, + } : {}; return { noteableData: JSON.parse(notesDataset.noteableData), - currentUserData: JSON.parse(notesDataset.currentUserData), + currentUserData, notesData: { lastFetchedAt: notesDataset.lastFetchedAt, discussionsPath: notesDataset.discussionsPath, |