Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 60c4f91

Browse files
author
George Treviranus
committed
small js optimization
1 parent 7644487 commit 60c4f91

File tree

10 files changed

+8
-10
lines changed

10 files changed

+8
-10
lines changed

dist/undernet.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/undernet.bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/undernet.bundle.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/undernet.bundle.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/undernet.css.zip

0 Bytes
Binary file not shown.

dist/undernet.js.zip

-56 Bytes
Binary file not shown.

dist/undernet.modules.js.zip

-3 Bytes
Binary file not shown.

dist/undernet.scss.zip

0 Bytes
Binary file not shown.

js/dist/components/accordion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function (_Utils) {
9393
this.accordionButtons = this.getElements("[".concat(selectors.ACCORDION_CONTAINER, "] [").concat(selectors.TARGET, "]"));
9494
this.accordionContentsAttr = "[".concat(selectors.ACCORDION_CONTAINER, "] [").concat(selectors.CONTENT, "]");
9595
this.accordionContents = this.getElements(this.accordionContentsAttr);
96-
this.getFocusableElements("[".concat(selectors.ACCORDION_CONTAINER, "] [").concat(selectors.CONTENT, "]")).forEach(function (element) {
96+
this.getFocusableElements(this.accordionContentsAttr).forEach(function (element) {
9797
element.setAttribute(selectors.TAB_INDEX, "-1");
9898
});
9999

js/src/components/accordion.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,9 @@ export default class Accordion extends Utils {
6262
this.accordionContentsAttr = `[${selectors.ACCORDION_CONTAINER}] [${selectors.CONTENT}]`
6363
this.accordionContents = this.getElements(this.accordionContentsAttr)
6464

65-
this.getFocusableElements(`[${selectors.ACCORDION_CONTAINER}] [${selectors.CONTENT}]`).forEach(
66-
element => {
67-
element.setAttribute(selectors.TAB_INDEX, "-1")
68-
},
69-
)
65+
this.getFocusableElements(this.accordionContentsAttr).forEach(element => {
66+
element.setAttribute(selectors.TAB_INDEX, "-1")
67+
})
7068

7169
if (this.accordionButtons.length) {
7270
this.accordionButtons.forEach(button => {

0 commit comments

Comments
 (0)