diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-15 03:08:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-15 03:08:06 +0300 |
commit | aebabf8f5a4b5b4ef68221aeb73729f91f11f98f (patch) | |
tree | 6cc4117df89eec3be7ea8cbb199515aef4622aca /app/assets/javascripts/reports | |
parent | 67cd2904c9ebd7ba346cc92a37ac953747a3f0e5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/reports')
-rw-r--r-- | app/assets/javascripts/reports/accessibility_report/store/getters.js | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/app/assets/javascripts/reports/accessibility_report/store/getters.js b/app/assets/javascripts/reports/accessibility_report/store/getters.js index 83e97a48e3b..9aff427e644 100644 --- a/app/assets/javascripts/reports/accessibility_report/store/getters.js +++ b/app/assets/javascripts/reports/accessibility_report/store/getters.js @@ -37,23 +37,12 @@ export const summaryStatus = state => { export const shouldRenderIssuesList = state => Object.values(state.report).some(x => Array.isArray(x) && x.length > 0); -export const unresolvedIssues = state => [ - ...state.report.existing_errors, - ...state.report.existing_warnings, - ...state.report.existing_notes, -]; - -export const resolvedIssues = state => [ - ...state.report.resolved_errors, - ...state.report.resolved_warnings, - ...state.report.resolved_notes, -]; - -export const newIssues = state => [ - ...state.report.new_errors, - ...state.report.new_warnings, - ...state.report.new_notes, -]; +// We could just map state, but we're going to iterate in the future +// to add notes and warnings to these issue lists, so I'm going to +// keep these as getters +export const unresolvedIssues = state => state.report.existing_errors; +export const resolvedIssues = state => state.report.resolved_errors; +export const newIssues = state => state.report.new_errors; // prevent babel-plugin-rewire from generating an invalid default during karma tests export default () => {}; |