Skip to content

Commit cdd4940

Browse files
committed
Fixed crash on iOS/Updated lib to 1.2.1
1 parent e80736e commit cdd4940

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ios/RNSurveyMonkeyView.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
#import <SurveyMonkeyiOSSDK/SurveyMonkeyiOSSDK.h>
55

66
static NSDictionary *SurveyMonkeyErrorJson(NSError *error) {
7+
NSDictionary *userInfo = error.userInfo;
8+
BOOL surveyError = userInfo[@"SurveyMonkeySDK_Error"];
9+
NSString *errorDescription = surveyError ? error.userInfo[@"SurveyMonkeySDK_Error"] : error.localizedDescription;
710
return @{
811
@"code": @(error.code),
9-
@"description": error.userInfo[@"SurveyMonkeySDK_Error"],
12+
@"description": errorDescription,
1013
@"fullDescription": error.description
1114
};
1215
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-survey-monkey",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "React Native library for Survey Monkey",
55
"contributors": [
66
"Yaroslav Fuchko <yarikpwnzer1@gmail.com>",

0 commit comments

Comments
 (0)