Skip to content

Commit

Permalink
Add class .govuk-frontend-supported for ES modules support (Checkbo…
Browse files Browse the repository at this point in the history
…xes)

Updates the Checkboxes component missed from:

* #3801
  • Loading branch information
colinrotherham committed Jun 29, 2023
1 parent 15ba686 commit f0ed42c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class Checkboxes {
* @param {Element} $module - HTML element to use for checkboxes
*/
constructor ($module) {
if (!($module instanceof HTMLElement)) {
if (!($module instanceof HTMLElement) || !document.body.classList.contains('govuk-frontend-supported')) {
return this
}

Expand Down

0 comments on commit f0ed42c

Please sign in to comment.