mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 04:35:36 +08:00
[ReactNative] Fix XHR
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user