Skip to content

Commit c47f4a3

Browse files
oliviertassinarikof
authored andcommitted
Improve IE 11 support (#1065)
* Improve IE 11 support startsWith is not supported by IE 11 * update changelog Done in 76.56s * Update changelog.md
1 parent 0c3dfe0 commit c47f4a3

File tree

6 files changed

+38
-32
lines changed

6 files changed

+38
-32
lines changed

changelog.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## Next
2+
3+
### Bug fixes
4+
5+
- [jss-plugin-camel-case] Fix some IE 11 regression ([#1065](https://github.com/cssinjs/jss/pull/1065))
6+
17
## 10.0.0-alpha.14 (2019-3-17)
28

39
### Improvements

packages/jss-plugin-camel-case/.size-snapshot.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
22
"dist/jss-plugin-camel-case.js": {
3-
"bundled": 2383,
4-
"minified": 856,
5-
"gzipped": 486
3+
"bundled": 2389,
4+
"minified": 858,
5+
"gzipped": 488
66
},
77
"dist/jss-plugin-camel-case.min.js": {
8-
"bundled": 2383,
9-
"minified": 856,
10-
"gzipped": 486
8+
"bundled": 2389,
9+
"minified": 858,
10+
"gzipped": 488
1111
},
1212
"dist/jss-plugin-camel-case.cjs.js": {
13-
"bundled": 1703,
14-
"minified": 735,
15-
"gzipped": 393
13+
"bundled": 1709,
14+
"minified": 737,
15+
"gzipped": 398
1616
},
1717
"dist/jss-plugin-camel-case.esm.js": {
18-
"bundled": 1485,
19-
"minified": 563,
20-
"gzipped": 307,
18+
"bundled": 1491,
19+
"minified": 565,
20+
"gzipped": 309,
2121
"treeshaked": {
2222
"rollup": {
2323
"code": 29,

packages/jss-plugin-camel-case/src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function convertCase(style) {
1212
const converted = {}
1313

1414
for (const prop in style) {
15-
const key = prop.startsWith('--') ? prop : hyphenate(prop)
15+
const key = prop.indexOf('--') === 0 ? prop : hyphenate(prop)
1616

1717
converted[key] = style[prop]
1818
}
@@ -44,7 +44,7 @@ export default function camelCase(): Plugin {
4444
}
4545

4646
function onChangeValue(value, prop, rule) {
47-
if (prop.startsWith('--')) {
47+
if (prop.indexOf('--') === 0) {
4848
return value
4949
}
5050

packages/jss-preset-default/.size-snapshot.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"dist/jss-preset-default.js": {
3-
"bundled": 53800,
4-
"minified": 19104,
5-
"gzipped": 6356
3+
"bundled": 53806,
4+
"minified": 19106,
5+
"gzipped": 6354
66
},
77
"dist/jss-preset-default.min.js": {
8-
"bundled": 53046,
9-
"minified": 18645,
10-
"gzipped": 6144
8+
"bundled": 53052,
9+
"minified": 18647,
10+
"gzipped": 6142
1111
},
1212
"dist/jss-preset-default.cjs.js": {
1313
"bundled": 1329,

packages/jss-starter-kit/.size-snapshot.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"dist/jss-starter-kit.js": {
3-
"bundled": 69342,
4-
"minified": 29117,
5-
"gzipped": 8981
3+
"bundled": 69348,
4+
"minified": 29119,
5+
"gzipped": 8978
66
},
77
"dist/jss-starter-kit.min.js": {
8-
"bundled": 68588,
9-
"minified": 28659,
10-
"gzipped": 8769
8+
"bundled": 68594,
9+
"minified": 28661,
10+
"gzipped": 8766
1111
},
1212
"dist/jss-starter-kit.cjs.js": {
1313
"bundled": 2592,

packages/react-jss/.size-snapshot.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"dist/react-jss.js": {
3-
"bundled": 109109,
4-
"minified": 36983,
5-
"gzipped": 11986
3+
"bundled": 109115,
4+
"minified": 36985,
5+
"gzipped": 11985
66
},
77
"dist/react-jss.min.js": {
8-
"bundled": 84550,
9-
"minified": 29718,
10-
"gzipped": 9800
8+
"bundled": 84556,
9+
"minified": 29720,
10+
"gzipped": 9799
1111
},
1212
"dist/react-jss.cjs.js": {
1313
"bundled": 15499,

0 commit comments

Comments
 (0)