glitch-javascript-sdk 0.7.9 → 0.8.0

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.
package/dist/esm/index.js CHANGED
@@ -5469,7 +5469,7 @@ var Requests = /** @class */ (function () {
5469
5469
  identifier = Array.from(array, function (dec) { return ('0' + dec.toString(16)).substr(-2); }).join('');
5470
5470
  _a.label = 1;
5471
5471
  case 1:
5472
- if (!(currentChunkIndex < totalChunks)) return [3 /*break*/, 3];
5472
+ if (!(currentChunkIndex <= totalChunks)) return [3 /*break*/, 3];
5473
5473
  start = currentChunkIndex * chunkSize;
5474
5474
  end = Math.min(start + chunkSize, fileSize);
5475
5475
  chunk = file.slice(start, end);
@@ -5495,9 +5495,9 @@ var Requests = /** @class */ (function () {
5495
5495
  onUploadProgress: function (progressEvent) {
5496
5496
  var currentChunkProgress = progressEvent.loaded; // Bytes uploaded of the current chunk
5497
5497
  // Calculate the total uploaded size including previous chunks and the current chunk's progress
5498
- var totalProgress = totalUploaded + currentChunkProgress;
5498
+ totalUploaded += currentChunkProgress;
5499
5499
  if (onProgress) {
5500
- onProgress(fileSize, totalProgress);
5500
+ onProgress(fileSize, totalUploaded);
5501
5501
  }
5502
5502
  }
5503
5503
  })];