mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-12 09:20:14 +08:00
[ReactNative] Fix XHR
This commit is contained in:
@@ -64,7 +64,9 @@ class XMLHttpRequest extends XMLHttpRequestBase {
|
||||
|
||||
_didCompleteResponse(requestId: number, error: string): void {
|
||||
if (requestId === this._requestId) {
|
||||
this.responseText = error;
|
||||
if (error) {
|
||||
this.responseText = error;
|
||||
}
|
||||
this._clearSubscriptions();
|
||||
this._requestId = null;
|
||||
this.setReadyState(this.DONE);
|
||||
|
||||
Reference in New Issue
Block a user