diff options
Diffstat (limited to 'app/assets/javascripts/ide/stores/actions/file.js')
-rw-r--r-- | app/assets/javascripts/ide/stores/actions/file.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/ide/stores/actions/file.js b/app/assets/javascripts/ide/stores/actions/file.js index dc40a1fa6a2..7627b6e03af 100644 --- a/app/assets/javascripts/ide/stores/actions/file.js +++ b/app/assets/javascripts/ide/stores/actions/file.js @@ -73,7 +73,9 @@ export const getFileData = ( .getFileData(joinPaths(gon.relative_url_root || '', url.replace('/-/', '/'))) .then(({ data, headers }) => { const normalizedHeaders = normalizeHeaders(headers); - setPageTitle(decodeURI(normalizedHeaders['PAGE-TITLE'])); + let title = normalizedHeaders['PAGE-TITLE']; + title = file.prevPath ? title.replace(file.prevPath, file.path) : title; + setPageTitle(decodeURI(title)); if (data) commit(types.SET_FILE_DATA, { data, file }); if (openFile) commit(types.TOGGLE_FILE_OPEN, path); |