Skip to content

Commit 4560a2f

Browse files
committed
Revert part of #253 as title should be optional
Similar to 1dc570b according to https://developer.apple.com/documentation/eventkit/ekstructuredlocation/1507137-title
1 parent 5864e23 commit 4560a2f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ios/RNCalendarEvents.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,10 +697,11 @@ - (NSDictionary *)serializeCalendarEvent:(EKEvent *)event
697697
[formedCalendarEvent setValue:[self availabilityStringMatchingConstant:event.availability] forKey:_availability];
698698

699699
@try {
700-
if (event.structuredLocation && event.structuredLocation.title && event.structuredLocation.radius) {
700+
if (event.structuredLocation && event.structuredLocation.radius) {
701701
NSMutableDictionary *structuredLocation = [[NSMutableDictionary alloc] initWithCapacity:3];
702702
[structuredLocation addEntriesFromDictionary: @{
703-
@"title": event.structuredLocation.title,
703+
@"title": event.structuredLocation.title
704+
? event.structuredLocation.title : @"",
704705
@"radius": @(event.structuredLocation.radius)
705706
}];
706707
if (event.structuredLocation.geoLocation) {

0 commit comments

Comments
 (0)