diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-09 09:09:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-09 09:09:30 +0300 |
commit | 4dfc8711171fe0c04bc6b8b224687603026dea46 (patch) | |
tree | e1b4640f8e56bb09f412a3dca1510983245491c2 /app/assets/javascripts/diffs/store/actions.js | |
parent | cfd62c3a3ebbc85f5787c103bfa6de1997ab8e11 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs/store/actions.js')
-rw-r--r-- | app/assets/javascripts/diffs/store/actions.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/diffs/store/actions.js b/app/assets/javascripts/diffs/store/actions.js index 18bbdf402ee..93c242e32ac 100644 --- a/app/assets/javascripts/diffs/store/actions.js +++ b/app/assets/javascripts/diffs/store/actions.js @@ -129,6 +129,18 @@ export const fetchDiffFilesBatch = ({ commit, state }) => { if (!pagination.next_page) { commit(types.SET_RETRIEVING_BATCHES, false); + if (gon.features?.codeNavigation) { + // eslint-disable-next-line promise/catch-or-return,promise/no-nesting + import('~/code_navigation').then(m => + m.default({ + blobs: state.diffFiles.map(f => ({ + path: f.new_path, + codeNavigationPath: f.code_navigation_path, + })), + definitionPathPrefix: state.definitionPathPrefix, + }), + ); + } } return pagination.next_page; |