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

Accordion.prototype.filterLocale appears to be unused #3978

Open
36degrees opened this issue Apr 9, 2024 · 0 comments
Open

Accordion.prototype.filterLocale appears to be unused #3978

36degrees opened this issue Apr 9, 2024 · 0 comments
Assignees

Comments

@36degrees
Copy link
Member

All references to filterLocale from within the class appear to have been removed in 4631b19 and there don't appear to be any other instances of it within alphagov.

GemAccordion.prototype.filterLocale = function (key) {
if (this.$module.actions.locale && this.$module.actions.locale.indexOf('{') !== -1) {
var locales = JSON.parse(this.$module.actions.locale)
return locales[key]
} else if (this.$module.actions.locale) {
return this.$module.actions.locale
}
}

On this basis I think the function is unused can be removed.

Possibly also these lines:

// language attribute pulled from data attributes
this.$module.actions = {}
this.$module.actions.locale = this.$module.getAttribute('data-locale')

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

No branches or pull requests

3 participants