diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-25 09:09:10 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-25 09:09:10 +0000 |
commit | b98fa9ef3d5bead417ae2f325cb64637883264e9 (patch) | |
tree | 409f2002dd056f12d82d3959b3e6f012c4087123 /app/assets/javascripts/ide/stores | |
parent | 7e3005967df23a957fe1998c8de4f50b412e69e7 (diff) | |
download | gitlab-ce-b98fa9ef3d5bead417ae2f325cb64637883264e9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ide/stores')
-rw-r--r-- | app/assets/javascripts/ide/stores/utils.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/assets/javascripts/ide/stores/utils.js b/app/assets/javascripts/ide/stores/utils.js index 06e66da1069..4e5b01596d8 100644 --- a/app/assets/javascripts/ide/stores/utils.js +++ b/app/assets/javascripts/ide/stores/utils.js @@ -1,5 +1,4 @@ import { commitActionTypes, FILE_VIEW_MODE_EDITOR } from '../constants'; -import { escapeFileUrl } from '~/lib/utils/url_utility'; export const dataStructure = () => ({ id: '', @@ -220,9 +219,7 @@ export const mergeTrees = (fromTree, toTree) => { export const replaceFileUrl = (url, oldPath, newPath) => { // Add `/-/` so that we don't accidentally replace project path - const result = url.replace(`/-/${escapeFileUrl(oldPath)}`, `/-/${escapeFileUrl(newPath)}`); - - return result; + return url.replace(`/-/${oldPath}`, `/-/${newPath}`); }; export const swapInStateArray = (state, arr, key, entryPath) => |