From 60375025e03868beef8f9a5cb0b970f4be13fdfd Mon Sep 17 00:00:00 2001 From: Rad Azzouz Date: Wed, 28 Aug 2019 11:08:42 -0400 Subject: [PATCH 1/2] Fix a crash that would occur when adding an invalid Instant JSON payload --- ios/RCTPSPDFKit/RCTPSPDFKitView.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/RCTPSPDFKit/RCTPSPDFKitView.m b/ios/RCTPSPDFKit/RCTPSPDFKitView.m index f7d96308..0f571fb8 100644 --- a/ios/RCTPSPDFKit/RCTPSPDFKitView.m +++ b/ios/RCTPSPDFKit/RCTPSPDFKitView.m @@ -212,7 +212,9 @@ - (BOOL)addAnnotation:(id)jsonAnnotation error:(NSError *_Nullable *)error { BOOL success = NO; if (data) { PSPDFAnnotation *annotation = [PSPDFAnnotation annotationFromInstantJSON:data documentProvider:documentProvider error:error]; - success = [document addAnnotations:@[annotation] options:nil]; + if (annotation) { + success = [document addAnnotations:@[annotation] options:nil]; + } } if (!success) { From 40ee2768455ef26c2bacbdc7c55b7742884e187d Mon Sep 17 00:00:00 2001 From: Rad Azzouz Date: Wed, 28 Aug 2019 11:19:50 -0400 Subject: [PATCH 2/2] Bump version to 1.25.6 --- package-lock.json | 2 +- package.json | 2 +- samples/Catalog/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d35cc8bd..ca1193b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-native-pspdfkit", - "version": "1.25.5", + "version": "1.25.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 198adaa2..d791d76e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-pspdfkit", - "version": "1.25.5", + "version": "1.25.6", "description": "A React Native module for the PSPDFKit library.", "keywords": [ "react native", diff --git a/samples/Catalog/package.json b/samples/Catalog/package.json index 4dadadf8..b870cbe9 100644 --- a/samples/Catalog/package.json +++ b/samples/Catalog/package.json @@ -1,6 +1,6 @@ { "name": "Catalog", - "version": "1.25.5", + "version": "1.25.6", "private": true, "scripts": { "start": "react-native start",