Skip to content

Commit 64680ce

Browse files
janzenzryami333
authored andcommitted
Switched usage of Array.prototype.findIndex to indexOf.
1 parent 56bd808 commit 64680ce

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -246,5 +246,3 @@ controlled manually thereafter.
246246
| Chrome | Desktop | latest |
247247
| Firefox | Desktop | latest |
248248
| Safari | OSX | latest |
249-
250-
>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.

src/helpers/AccordionStore.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,7 @@ export default class AccordionStore {
7878
};
7979

8080
public readonly isItemExpanded = (uuid: UUID): boolean => {
81-
return (
82-
this.expanded.findIndex(
83-
(expandedUuid: UUID) => expandedUuid === uuid,
84-
) !== -1
85-
);
81+
return this.expanded.indexOf(uuid) !== -1;
8682
};
8783

8884
public readonly getPanelAttributes = (

0 commit comments

Comments
 (0)