Skip to content

Commit b2f073e

Browse files
authored
Merge pull request #408 from otbe/add-safari-ie-support
add support for browsers without native fetch
2 parents c6ffe23 + 15e0494 commit b2f073e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

components/vote/app.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
import 'whatwg-fetch';
23
import SidebarItem from '../sidebar-item/sidebar-item';
34
import * as api from "./api";
45
import './app-style';
@@ -26,7 +27,7 @@ export default class VoteApp extends React.Component {
2627
}
2728

2829
isBrowserSupported() {
29-
return typeof localStorage === 'object' && typeof fetch === 'function';
30+
return typeof localStorage === 'object';
3031
}
3132

3233
componentDidMount() {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
"preact-compat": "^3.6.0",
9898
"react": "^15.3.2",
9999
"react-dom": "^15.3.2",
100-
"react-router": "^2.8.1"
100+
"react-router": "^2.8.1",
101+
"whatwg-fetch": "^2.0.1"
101102
}
102103
}

0 commit comments

Comments
 (0)