From 235474f450def7e572d2180c7923b1803561f7ec Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Tue, 31 Mar 2015 01:59:10 -0400 Subject: [PATCH] Fix a crash in AsyncLocalStorage when the value is not a string. --- React/Modules/RCTAsyncLocalStorage.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Modules/RCTAsyncLocalStorage.m b/React/Modules/RCTAsyncLocalStorage.m index e1daeb2fb83f1e..95fb383e484559 100644 --- a/React/Modules/RCTAsyncLocalStorage.m +++ b/React/Modules/RCTAsyncLocalStorage.m @@ -157,7 +157,7 @@ - (id)_writeEntry:(NSArray *)entry return RCTMakeAndLogError(@"Entries must be arrays of the form [key: string, value: string], got: ", entry, nil); } if (![entry[1] isKindOfClass:[NSString class]]) { - return RCTMakeAndLogError(@"Values must be strings, got: ", entry[1], entry[0]); + return RCTMakeAndLogError(@"Values must be strings, got: ", entry[1], @{@"key": entry[0]}); } NSString *key = entry[0]; id errorOut = RCTErrorForKey(key);