diff --git a/demo/src/index.js b/demo/src/index.js index bd196a99..c4d41e34 100644 --- a/demo/src/index.js +++ b/demo/src/index.js @@ -2,6 +2,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; // import registerServiceWorker from './registerServiceWorker'; +import './polyfill' ReactDOM.render(, document.querySelector('#demo')) // ReactDOM.render(, document.getElementById('root')); diff --git a/demo/src/polyfill.js b/demo/src/polyfill.js new file mode 100644 index 00000000..4dda5837 --- /dev/null +++ b/demo/src/polyfill.js @@ -0,0 +1,24 @@ +// IE11 polyfills + +if (!Array.prototype.find) { + Array.prototype.find = function(predicate) { + if (this == null) { + throw new TypeError('Array.prototype.find called on null or undefined'); + } + if (typeof predicate !== 'function') { + throw new TypeError('predicate must be a function'); + } + const list = Object(this); + const length = list.length >>> 0; + const thisArg = arguments[1]; + let value; + + for (let i = 0; i < length; i++) { + value = list[i]; + if (predicate.call(thisArg, value, i, list)) { + return value; + } + } + return undefined; + }; +} diff --git a/package.json b/package.json index a2f8dee9..eeed3eb6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@coreui/react", - "version": "2.0.0-beta.1", + "version": "2.0.0-beta.2", "description": "CoreUI React Bootstrap 4 components", "main": "lib/index.js", "module": "es/index.js", @@ -21,7 +21,7 @@ "lint": "eslint src" }, "dependencies": { - "@coreui/coreui": "^2.0.0-beta.10", + "@coreui/coreui": "^2.0.0-rc.1", "bootstrap": "^4.1.0", "classnames": "^2.2.5", "prop-types": "^15.6.1", @@ -45,7 +45,7 @@ "nwb": "^0.21.5", "react": "^16.3.2", "react-dom": "^16.3.2", - "sinon": "^4.5.0" + "sinon": "^5.0.1" }, "author": "Ɓukasz Holeczek", "homepage": "http://coreui.io",