diff options
author | Phil Hughes <me@iamphill.com> | 2018-11-07 16:03:13 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-11-07 16:03:13 +0300 |
commit | e354a64e89bcbce64871af8d49a3515f652f4e37 (patch) | |
tree | a96e86e610ec64f340f7d834928da9710ae378d3 /app/assets/javascripts/diffs/store/getters.js | |
parent | 2508d7b32ecc965df3009ec5f0472c0c9693697b (diff) |
Show expand all button on merge request diffs
This restores the behaviour of showing the expand all button on diffs
even when only a single file is collapsed.
Previously the button would only show when all files are collapsed.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51737
Diffstat (limited to 'app/assets/javascripts/diffs/store/getters.js')
-rw-r--r-- | app/assets/javascripts/diffs/store/getters.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/diffs/store/getters.js b/app/assets/javascripts/diffs/store/getters.js index 2bf0ad99c22..bf490f9d78a 100644 --- a/app/assets/javascripts/diffs/store/getters.js +++ b/app/assets/javascripts/diffs/store/getters.js @@ -5,7 +5,7 @@ export const isParallelView = state => state.diffViewType === PARALLEL_DIFF_VIEW export const isInlineView = state => state.diffViewType === INLINE_DIFF_VIEW_TYPE; -export const areAllFilesCollapsed = state => state.diffFiles.every(file => file.collapsed); +export const hasCollapsedFile = state => state.diffFiles.some(file => file.collapsed); export const commitId = state => (state.commit && state.commit.id ? state.commit.id : null); |