Skip to content

Commit

Permalink
[TIMOB-8440] Added checks for non-existent xhr.upload.
Browse files Browse the repository at this point in the history
  • Loading branch information
nebrius committed Mar 30, 2012
1 parent 2803b7d commit fa9b05e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mobileweb/titanium/Ti/Network/HTTPClient.js
Expand Up @@ -11,12 +11,12 @@ define(["Ti/_", "Ti/_/declare", "Ti/_/lang", "Ti/_/Evented", "Ti/Network", "Ti/B

this._handles = [
on(xhr, "error", this, "_onError"),
on(xhr.upload, "error", this, "_onError"),
xhr.upload && on(xhr.upload, "error", this, "_onError"),
on(xhr, "progress", this, function(evt) {
evt.progress = evt.lengthComputable ? evt.loaded / evt.total : false;
is(this.ondatastream, "Function") && this.ondatastream.call(this, evt);
}),
on(xhr.upload, "progress", this, function(evt) {
xhr.upload && on(xhr.upload, "progress", this, function(evt) {
evt.progress = evt.lengthComputable ? evt.loaded / evt.total : false;
is(this.onsendstream, "Function") && this.onsendstream.call(this, evt);
})
Expand Down

0 comments on commit fa9b05e

Please sign in to comment.