Skip to content

Commit 3cc8914

Browse files
authored
Merge pull request #134 from anna-apanasik/bugfix/ie-11-support
Support of IE 11
2 parents f55b569 + d43b3a8 commit 3cc8914

File tree

4 files changed

+48
-5
lines changed

4 files changed

+48
-5
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"postcss-loader": "^3.0.0",
121121
"react-color": "^2.14.1",
122122
"react-dropzone": "7.0.1",
123-
"react-hot-loader": "^4.3",
123+
"react-hot-loader": "4.6.0",
124124
"react-test-renderer": "^16.6.1",
125125
"react-transform-hmr": "^1.0.4",
126126
"rimraf": "^2.6.2",

src/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import './polyfill'
12
import SketchField from './SketchField'
23
import Tools from './tools'
34

src/polyfill.js

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Object.assign() polyfill for IE11
3+
* @see <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign>
4+
*/
5+
6+
if (typeof Object.assign != "function") {
7+
Object.defineProperty(Object, "assign", {
8+
value: function assign(target, varArgs) {
9+
"use strict";
10+
if (target == null) {
11+
throw new TypeError("Cannot convert undefined or null to object");
12+
}
13+
var to = Object(target);
14+
for (var index = 1; index < arguments.length; index++) {
15+
var nextSource = arguments[index];
16+
if (nextSource != null) {
17+
for (var nextKey in nextSource) {
18+
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
19+
to[nextKey] = nextSource[nextKey];
20+
}
21+
}
22+
}
23+
}
24+
return to;
25+
},
26+
writable: true,
27+
configurable: true
28+
});
29+
}

yarn.lock

+17-4
Original file line numberDiff line numberDiff line change
@@ -5957,6 +5957,11 @@ lodash.keys@^3.0.0:
59575957
lodash.isarguments "^3.0.0"
59585958
lodash.isarray "^3.0.0"
59595959

5960+
lodash.merge@^4.6.1:
5961+
version "4.6.2"
5962+
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
5963+
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
5964+
59605965
lodash.sortby@^4.7.0:
59615966
version "4.7.0"
59625967
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
@@ -7563,17 +7568,20 @@ react-event-listener@^0.6.2:
75637568
prop-types "^15.6.0"
75647569
warning "^4.0.1"
75657570

7566-
react-hot-loader@^4.3:
7567-
version "4.3.12"
7568-
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.3.12.tgz#0d56688884e7330c63a00a17217866280616b07a"
7569-
integrity sha512-GMM4TsqUVss2QPe+Y33NlgydA5/+7tAVQxR0rZqWvBpapM8JhD7p6ymMwSZzr5yxjoXXlK/6P6qNQBOqm1dqdg==
7571+
react-hot-loader@4.6.0:
7572+
version "4.6.0"
7573+
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.6.0.tgz#7a556efea51a3c79e8bffdb094fbe17883a79432"
7574+
integrity sha512-ytmtbJB0RlTUqa9HnpVsoZiZ6iRsTzu+O2WovKT++f+tDYOTNZYa7OesVAE+R90e/1w/OJO4G/tw4rNSMYCjFw==
75707575
dependencies:
75717576
fast-levenshtein "^2.0.6"
75727577
global "^4.3.0"
75737578
hoist-non-react-statics "^2.5.0"
7579+
loader-utils "^1.1.0"
7580+
lodash.merge "^4.6.1"
75747581
prop-types "^15.6.1"
75757582
react-lifecycles-compat "^3.0.4"
75767583
shallowequal "^1.0.2"
7584+
source-map "^0.7.3"
75777585

75787586
react-is@^16.3.2, react-is@^16.6.1:
75797587
version "16.6.1"
@@ -8424,6 +8432,11 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
84248432
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
84258433
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
84268434

8435+
source-map@^0.7.3:
8436+
version "0.7.3"
8437+
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
8438+
integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
8439+
84278440
spdx-correct@^3.0.0:
84288441
version "3.0.2"
84298442
resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.2.tgz#19bb409e91b47b1ad54159243f7312a858db3c2e"

0 commit comments

Comments
 (0)