Skip to content

Commit 2192bf5

Browse files
authored
Merge pull request #36 from pointcloudtechnology/34-fix-settimeout-in-resumablechunk
Fix setTimeout callback without proper context
2 parents 6a48022 + cc200e4 commit 2192bf5

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
### Removed
1717

18+
## [4.0.1]
19+
### Fixed
20+
* Fix setTimeout callback without proper context (#36)
21+
1822
## [4.0.0]
1923
### BREAKING
2024
Unique identifiers by default do not use the relative path anymore. This means that there is no support for files with the same name from different subfolders when dropping a folder directly.

dist/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "resumablejs",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "A JavaScript library for providing multiple simultaneous, stable, fault-tolerant and resumable/restartable uploads via the HTML5 File API.",
55
"main": "dist/main.js",
66
"private": false,

src/resumableChunk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export default class ResumableChunk extends ResumableEventHandler {
279279
let retryInterval = this.chunkRetryInterval;
280280
if (retryInterval !== undefined) {
281281
this.pendingRetry = true;
282-
setTimeout(this.send, retryInterval);
282+
setTimeout(() => this.send(), retryInterval);
283283
} else {
284284
this.send();
285285
}

0 commit comments

Comments
 (0)