mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
iOS: Log error when invalid NSNull data is passed to RCTAsyncLocalStorage
Summary: Changelog: [Internal] Differential Revision: D30081478 fbshipit-source-id: 7d425e71b020eaeb4eb1b33b500fbf5df7ea9c29
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c39a4c7f2e
commit
363a8fb08c
@@ -306,7 +306,11 @@ RCT_EXPORT_MODULE()
|
||||
if (errorOut) {
|
||||
return errorOut;
|
||||
}
|
||||
if (![entry[1] isKindOfClass:[NSString class]]) {
|
||||
return RCTMakeAndLogError(@"Invalid value for entry - must be a string. Got entry: ", entry, nil);
|
||||
}
|
||||
NSString *value = entry[1];
|
||||
|
||||
NSString *filePath = [self _filePathForKey:key];
|
||||
NSError *error;
|
||||
if (value.length <= RCTInlineValueThreshold) {
|
||||
|
||||
Reference in New Issue
Block a user