[ReactNative] Fix XHR
This commit is contained in:
parent
1c9e957d22
commit
8ee9bfe944
|
@ -64,7 +64,9 @@ class XMLHttpRequest extends XMLHttpRequestBase {
|
||||||
|
|
||||||
_didCompleteResponse(requestId: number, error: string): void {
|
_didCompleteResponse(requestId: number, error: string): void {
|
||||||
if (requestId === this._requestId) {
|
if (requestId === this._requestId) {
|
||||||
this.responseText = error;
|
if (error) {
|
||||||
|
this.responseText = error;
|
||||||
|
}
|
||||||
this._clearSubscriptions();
|
this._clearSubscriptions();
|
||||||
this._requestId = null;
|
this._requestId = null;
|
||||||
this.setReadyState(this.DONE);
|
this.setReadyState(this.DONE);
|
||||||
|
|
Loading…
Reference in New Issue