Skip to content

Commit 1eb547a

Browse files
illyaVvengrov
authored andcommitted
fix (files) sendEncoded ignores async. This fixes #54
1 parent 2290c08 commit 1eb547a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libs/backendless.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3443,7 +3443,9 @@
34433443
return result;
34443444
};
34453445

3446-
xhr.open("PUT", this.uploadPath, true);
3446+
var asyncHandler = this.asyncHandler;
3447+
3448+
xhr.open("PUT", this.uploadPath, !!asyncHandler);
34473449
xhr.setRequestHeader('Content-Type', 'text/plain');
34483450
xhr.setRequestHeader('application-id', Backendless.applicationId);
34493451
xhr.setRequestHeader("secret-key", Backendless.secretKey);
@@ -3453,8 +3455,6 @@
34533455
xhr.setRequestHeader("uiState", UIState);
34543456
}
34553457

3456-
var asyncHandler = this.asyncHandler;
3457-
34583458
if (asyncHandler) {
34593459
xhr.onreadystatechange = function() {
34603460
if (xhr.readyState == 4) {

0 commit comments

Comments
 (0)