Index: sky/framework/xmlhttprequest.sky |
diff --git a/sky/framework/xmlhttprequest.sky b/sky/framework/xmlhttprequest.sky |
index 1b5505d40847e0b8b77ab59766f8339a72a5eceb..50d92bdfc88e557de5bc39e08acafe0749abe062 100644 |
--- a/sky/framework/xmlhttprequest.sky |
+++ b/sky/framework/xmlhttprequest.sky |
@@ -42,11 +42,9 @@ XMLHttpRequest.prototype.send = function() { |
var self = this; |
this.loader_.start(this.request_).then(function(result) { |
- core.drainData(result.response.body).then(function(result) { |
+ return core.drainData(result.response.body).then(function(result) { |
self.responseText = unicode.decodeUtf8String(new Uint8Array(result.buffer)); |
self.onload(); |
- }).catch(function(error) { |
- self.onerror(error); |
}); |
}).catch(function(error) { |
self.onerror(error); |