[ReactNative] Don't log invalid utf8 strings

This commit is contained in:
Tadeu Zagallo 2015-04-29 12:29:04 -07:00
parent 96850b7429
commit 483077d4da
1 changed files with 1 additions and 2 deletions

View File

@ -35,8 +35,7 @@ id RCTJSONParse(NSString *jsonString, NSError **error)
if (jsonData) { if (jsonData) {
RCTLogWarn(@"RCTJSONParse received the following string, which could not be losslessly converted to UTF8 data: '%@'", jsonString); RCTLogWarn(@"RCTJSONParse received the following string, which could not be losslessly converted to UTF8 data: '%@'", jsonString);
} else { } else {
// If our backup conversion fails, log the issue so we can see what strings are causing this (t6452813) RCTLogError(@"RCTJSONParse received invalid UTF8 data");
RCTLogError(@"RCTJSONParse received the following string, which could not be converted to UTF8 data: '%@'", jsonString);
return nil; return nil;
} }
} }