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

Remove unused console.log calls from accordion JavaScript #2766

Merged
merged 2 commits into from
Aug 17, 2022

Conversation

36degrees
Copy link
Contributor

Because of the way the if statements are written, these attempts to call console.log and console.error will only ever run if either console or console.log is undefined (and therfore not a function). They will never successfully write anything to the console log.

Given that they’ve been like this for several years (since 027373d), we can safely assume they’re not doing anything useful, and can remove them.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2766 August 15, 2022 14:29 Inactive
@owenatgov owenatgov added this to the [NEXT] milestone Aug 15, 2022
Copy link
Contributor

@owenatgov owenatgov left a comment

Choose a reason for hiding this comment

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

Does the job 👍🏻

Whilst the impact to the user will be minor, this could also do with a quick fixes changelog entry.

I've also been pedantic and added this to the [NEXT] milestone.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2766 August 15, 2022 17:02 Inactive
Because of the way the if statements are written, these attempts to call `console.log` and `console.error` will only ever run if either `console` or `console.log` is undefined (and therfore _not_ a function). They will never successfully write anything to the console log.

Given that they’ve been like this for several years (since 027373d), we can safely assume they’re not doing anything useful, and can remove them.
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2766 August 17, 2022 10:20 Inactive
@36degrees 36degrees merged commit 8ac8213 into main Aug 17, 2022
@36degrees 36degrees deleted the accordion-console-logs branch August 17, 2022 12:57
@36degrees 36degrees mentioned this pull request Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants