Skip to content

Commit

Permalink
get modulename directly
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickpatrickpatrick committed Aug 28, 2024
1 parent 5b87ed8 commit 849146f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/govuk-frontend/src/govuk/errors/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,9 @@ export class InitError extends GOVUKFrontendError {

/**
* @internal
* @param {Element} $module - HTML element already initialised
* @param {string} moduleName - name of the component module
*/
constructor($module) {
const moduleName = $module.getAttribute('data-module')
constructor(moduleName) {
super(`Root element (\`$module\`) already initialised (\`${moduleName}\`)`)
}
}
Expand Down

0 comments on commit 849146f

Please sign in to comment.