Fixing bug in response

This commit is contained in:
David Martins
2017-10-06 17:20:26 -03:00
parent c84046e86e
commit 4c0c4c70bc

View File

@@ -298,6 +298,7 @@ export class FileUploader {
} }
protected _xhrTransport(item:FileItem):any { protected _xhrTransport(item:FileItem):any {
let that = this;
let xhr = item._xhr = new XMLHttpRequest(); let xhr = item._xhr = new XMLHttpRequest();
let sendable:any; let sendable:any;
this._onBeforeUploadItem(item); this._onBeforeUploadItem(item);
@@ -366,7 +367,7 @@ export class FileUploader {
} }
xhr.onreadystatechange = function() { xhr.onreadystatechange = function() {
if (xhr.readyState == XMLHttpRequest.DONE) { if (xhr.readyState == XMLHttpRequest.DONE) {
this.response.emit(xhr.responseText) that.response.emit(xhr.responseText)
} }
} }
if (this.options.formatDataFunctionIsAsync) { if (this.options.formatDataFunctionIsAsync) {