Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix to get around Illegal invocation error in chrome
  • Loading branch information
zbyte64 committed Jun 11, 2015
commit 877c47c6f4c2c8b1788e823e82a391a2331fdc80
7 changes: 6 additions & 1 deletion src/react-fetch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import React from 'react/addons'
import fetch from 'isomorphic-fetch'

//this is to hack around a bug, see:
//https://github.com/matthew-andrews/isomorphic-fetch/pull/20
//import fetch from 'isomorphic-fetch'
import fetch_ from 'isomorphic-fetch';
var fetch = fetch_.bind(undefined);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think lines 2-6 can simply be replaced with:

import 'isomorphic-fetch'

(don't import anything into the scope, use the global fetch after importing)


export default class Fetch extends React.Component{

Expand Down