glitch-javascript-sdk 0.8.0 → 0.8.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -255,10 +255,10 @@ class Requests {
255
255
  onUploadProgress: (progressEvent) => {
256
256
  const currentChunkProgress = progressEvent.loaded; // Bytes uploaded of the current chunk
257
257
  // Calculate the total uploaded size including previous chunks and the current chunk's progress
258
- totalUploaded += currentChunkProgress;
258
+ const totalProgress = totalUploaded + currentChunkProgress;
259
259
 
260
260
  if(onProgress){
261
- onProgress(fileSize, totalUploaded);
261
+ onProgress(fileSize, totalProgress);
262
262
  }
263
263
  }
264
264
  });