Skip to content

Commit 448fa42

Browse files
verebelyintimche
authored andcommitted
IE11 does not support Array.prototype.includes (#335)
1 parent 6daa0c0 commit 448fa42

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/utils/camelCase.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import camelCase from 'to-camel-case';
33
const namespacer = '/';
44

55
export default type =>
6-
type.includes(namespacer)
7-
? type
6+
type.indexOf(namespacer) === -1
7+
? camelCase(type)
8+
: type
89
.split(namespacer)
910
.map(camelCase)
10-
.join(namespacer)
11-
: camelCase(type);
11+
.join(namespacer);

0 commit comments

Comments
 (0)