mirror of
https://github.com/encounter/react-add-to-calendar.git
synced 2026-07-10 21:18:44 -07:00
obviously working too late. somehow overwrote my own previous commit…
- adding back in the IE bug fix polyfill for `startsWith` - also updating the README to reflect latest supported react version
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
node_modules
|
||||
.sass-cache
|
||||
npm-debug.log
|
||||
.idea
|
||||
dist
|
||||
lib
|
||||
tmp
|
||||
coverage
|
||||
0.md
|
||||
@@ -70,7 +70,7 @@ See [here](https://github.com/jasonsalzman/react-add-to-calendar/blob/master/doc
|
||||
I'll do my best to stay compatible with the latest version of React. I can't guarantee support for all older versions of React.
|
||||
|
||||
Latest compatible versions:
|
||||
- React 15.0.0 or newer
|
||||
- React 15.5.0 or newer
|
||||
|
||||
### Browser Support
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"author": "Jason Salzman",
|
||||
"name": "react-add-to-calendar",
|
||||
"description": "A simple and reusable add to calendar button component for React",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/jasonsalzman/react-add-to-calendar",
|
||||
"repository": {
|
||||
|
||||
@@ -18,6 +18,14 @@ export default class ReactAddToCalendar extends React.Component {
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
// polyfill for startsWith to fix IE bug
|
||||
if (!String.prototype.startsWith) {
|
||||
String.prototype.startsWith = function(searchString, position) {
|
||||
position = position || 0;
|
||||
return this.indexOf(searchString, position) === position;
|
||||
};
|
||||
}
|
||||
|
||||
let isCrappyIE = false;
|
||||
if (
|
||||
typeof window !== "undefined" &&
|
||||
|
||||
Reference in New Issue
Block a user