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/cjs/index.js CHANGED
@@ -18653,7 +18653,7 @@ var Requests = /** @class */ (function () {
18653
18653
  identifier = Array.from(array, function (dec) { return ('0' + dec.toString(16)).substr(-2); }).join('');
18654
18654
  _a.label = 1;
18655
18655
  case 1:
18656
- if (!(currentChunkIndex < totalChunks)) return [3 /*break*/, 3];
18656
+ if (!(currentChunkIndex <= totalChunks)) return [3 /*break*/, 3];
18657
18657
  start = currentChunkIndex * chunkSize;
18658
18658
  end = Math.min(start + chunkSize, fileSize);
18659
18659
  chunk = file.slice(start, end);
@@ -18679,9 +18679,9 @@ var Requests = /** @class */ (function () {
18679
18679
  onUploadProgress: function (progressEvent) {
18680
18680
  var currentChunkProgress = progressEvent.loaded; // Bytes uploaded of the current chunk
18681
18681
  // Calculate the total uploaded size including previous chunks and the current chunk's progress
18682
- var totalProgress = totalUploaded + currentChunkProgress;
18682
+ totalUploaded += currentChunkProgress;
18683
18683
  if (onProgress) {
18684
- onProgress(fileSize, totalProgress);
18684
+ onProgress(fileSize, totalUploaded);
18685
18685
  }
18686
18686
  }
18687
18687
  })];