parent
79e4c4a104
commit
2ca8fa6e66
5 changed files with 16 additions and 7 deletions
|
|
@ -67,7 +67,7 @@ module.exports = function($window, Promise) {
|
|||
resolve(data)
|
||||
$window[callbackKey] = undefined
|
||||
}
|
||||
script.onerror = function(e) {
|
||||
script.onerror = function() {
|
||||
script.parentNode.removeChild(script)
|
||||
reject(new Error("JSONP request failed"))
|
||||
$window[callbackKey] = undefined
|
||||
|
|
@ -111,4 +111,4 @@ module.exports = function($window, Promise) {
|
|||
function extract(xhr) {return xhr.responseText}
|
||||
|
||||
return {ajax: ajax, jsonp: jsonp}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue