Fixed nil object insertion crash due to incorrectly encoded HTTP response body data

This commit is contained in:
Nick Lockwood 2015-04-28 04:53:55 -07:00
parent 8afdf30363
commit bc24be8584
2 changed files with 2 additions and 1 deletions

View File

@ -61,7 +61,7 @@ RCT_EXPORT_METHOD(queryData:(NSString *)queryType
responseJSON = @{
@"status": @0,
@"responseHeaders": @{},
@"responseText": [connectionError localizedDescription]
@"responseText": [connectionError localizedDescription] ?: [NSNull null];
};
}

View File

@ -191,6 +191,7 @@ static NSArray *RCTBridgeModuleClassesByModuleID(void)
superclass = class_getSuperclass(superclass);
}
}
free(classes);
}
});