Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: remove unneeded reportCategories from LH.ReportResult #9001

Merged
merged 1 commit into from
May 20, 2019

Conversation

brendankenny
Copy link
Member

@brendankenny brendankenny commented May 20, 2019

Util.prepareReportResult smooshes audit results onto audit refs, but it also creates a bonus array of the report categories via Object.values(). We barely use these and we all agree they're technical debt, so this is an easy removal.

As a bonus, this PR clears up all the many places we're calling .find() on that array to find a particular category, when the original categories is already indexed by category id :)

(noticed while cleaning up prepareReportResult in #8822, but punted until after I/O)

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool beans 👍

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants