-
Notifications
You must be signed in to change notification settings - Fork 295
Fixed iOS null event crash issue #311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Please merge this |
| CGFloat r = components[0]; | ||
| CGFloat g = components[1]; | ||
| CGFloat b = components[2]; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure about this change?
This seems more defensive programming that could be legit (I didn't check the git history to find out)
| } | ||
|
|
||
| NSURL *URL = [NSURL URLWithString:[url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]]; | ||
| NSURL *URL = [NSURL URLWithString:[url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We recently made a fix somewhere, are you also sure about this change?
| NSDictionary * sCalendarEvent = [self serializeCalendarEvent:event]; | ||
| if(sCalendarEvent != nil){ | ||
| [serializedCalendarEvents addObject:sCalendarEvent]; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This look like it's the fix you want to push?
| return [formedCalendarEvent copy]; | ||
| } @catch (NSException *exception) { | ||
| return nil; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not familiar is iOS code, but this look like it's not that safe to return nil.
What is the goal of this? How does JS should behave with this change?
| [formedCalendarEvent setValue:[self availabilityStringMatchingConstant:event.availability] forKey:_availability]; | ||
|
|
||
| if (event.structuredLocation && event.structuredLocation.title && event.structuredLocation.radius) { | ||
| if (event.structuredLocation) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason you remove some safety tests?
| if (event.calendar) { | ||
| [formedCalendarEvent setValue:@{ | ||
| @"id": event.calendar.calendarIdentifier?event.calendar.calendarIdentifier: @"tempCalendar", | ||
| @"id": event.calendar.calendarIdentifier, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain me this change please?
| return resolve(@(success)); | ||
| }); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
| resolve(sCalendarEvent); | ||
| }else{ | ||
| resolve(@[]); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks legit 👍
| }else{ | ||
| reject(@"error", @"error finding event", nil); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the behave without this change?
|
It seems you reverted 4cb815b without paying attention :) |
No description provided.