parse 4.0.0-alpha.2 → 4.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v4.0.0-alpha.2
2
+ * Parse JavaScript SDK v4.0.0-alpha.4
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -699,7 +699,7 @@ var config
699
699
  SERVER_AUTH_TOKEN: null,
700
700
  LIVEQUERY_SERVER_URL: null,
701
701
  ENCRYPTED_KEY: null,
702
- VERSION: 'js' + "4.0.0-alpha.2",
702
+ VERSION: 'js' + "4.0.0-alpha.4",
703
703
  APPLICATION_ID: null,
704
704
  JAVASCRIPT_KEY: null,
705
705
  MASTER_KEY: null,
@@ -24426,8 +24426,8 @@ var RESTController = {
24426
24426
  headers[key] = customHeaders[key];
24427
24427
  }
24428
24428
 
24429
- function handleProgress(type, event) {
24430
- if (options && typeof options.progress === 'function') {
24429
+ if (options && typeof options.progress === 'function') {
24430
+ var handleProgress = function handleProgress(type, event) {
24431
24431
  if (event.lengthComputable) {
24432
24432
  options.progress(event.loaded / event.total, event.loaded, event.total, {
24433
24433
  type: type
@@ -24437,17 +24437,17 @@ var RESTController = {
24437
24437
  type: type
24438
24438
  });
24439
24439
  }
24440
- }
24441
- }
24442
-
24443
- xhr.onprogress = function (event) {
24444
- handleProgress('download', event);
24445
- };
24440
+ };
24446
24441
 
24447
- if (xhr.upload) {
24448
- xhr.upload.onprogress = function (event) {
24449
- handleProgress('upload', event);
24442
+ xhr.onprogress = function (event) {
24443
+ handleProgress('download', event);
24450
24444
  };
24445
+
24446
+ if (xhr.upload) {
24447
+ xhr.upload.onprogress = function (event) {
24448
+ handleProgress('upload', event);
24449
+ };
24450
+ }
24451
24451
  }
24452
24452
 
24453
24453
  xhr.open(method, url, true);