From e354a64e89bcbce64871af8d49a3515f652f4e37 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 7 Nov 2018 13:03:13 +0000 Subject: 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 --- app/assets/javascripts/diffs/store/getters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/assets/javascripts/diffs/store/getters.js') 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); -- cgit v1.2.3