diff --git a/index.mjs b/index.mjs index 7a1ee90..673cf5f 100644 --- a/index.mjs +++ b/index.mjs @@ -1,3 +1,3 @@ import CookieConsent from "./src/cookie-consent.mjs"; -export default CookieConsent; \ No newline at end of file +export default CookieConsent; diff --git a/src/dialog-tablist.mjs b/src/dialog-tablist.mjs index a6c2509..c84a178 100644 --- a/src/dialog-tablist.mjs +++ b/src/dialog-tablist.mjs @@ -27,10 +27,9 @@ const DialogTabList = (cookieInformation) => { * `required: false`, because of #3) * 3. Use the `checked` setting. */ - const shouldBeChecked = - typeof accepted !== "undefined" - ? accepted - : required === true + const shouldBeChecked = typeof accepted !== "undefined" + ? accepted + : required === true ? required : checked; @@ -96,9 +95,7 @@ const DialogTabList = (cookieInformation) => { : undefined, })); return ` -