Skip to content

Commit

Permalink
Fix reqwest for IE. Fixes ded#151
Browse files Browse the repository at this point in the history
  • Loading branch information
noidontdig committed Aug 13, 2014
1 parent d62f04f commit 689ed59
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions reqwest.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,10 @@
}

function success (resp) {
var type = o['type'] || setType(resp.getResponseHeader('Content-Type'))
var type = o['type']
if (resp) {
type = setType(resp.getResponseHeader('Content-Type'))
}
resp = (type !== 'jsonp') ? self.request : resp
// use global data filter on response text
var filteredResponse = globalSetupOptions.dataFilter(resp.responseText, type)
Expand Down Expand Up @@ -411,9 +414,6 @@
}
return this
}
, catch: function (fn) {
return this.fail(fn)
}
}

function reqwest(o, fn) {
Expand Down

1 comment on commit 689ed59

@iclanzan
Copy link

Choose a reason for hiding this comment

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

Can you publish this to npm please?

Please sign in to comment.