Skip to content

Commit

Permalink
Switched usage of Array.prototype.findIndex to indexOf.
Browse files Browse the repository at this point in the history
  • Loading branch information
janzenz authored and ryami333 committed Nov 14, 2019
1 parent 56bd808 commit 64680ce
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions README.md
Expand Up @@ -246,5 +246,3 @@ controlled manually thereafter.
| Chrome | Desktop | latest |
| Firefox | Desktop | latest |
| Safari | OSX | latest |
>Note: This library does not have polyfill support for `Array.prototype.findIndex`, so if you require support **IE 11** you will need to add polyfill in your build or manually add it.
6 changes: 1 addition & 5 deletions src/helpers/AccordionStore.ts
Expand Up @@ -78,11 +78,7 @@ export default class AccordionStore {
};

public readonly isItemExpanded = (uuid: UUID): boolean => {
return (
this.expanded.findIndex(
(expandedUuid: UUID) => expandedUuid === uuid,
) !== -1
);
return this.expanded.indexOf(uuid) !== -1;
};

public readonly getPanelAttributes = (
Expand Down

0 comments on commit 64680ce

Please sign in to comment.