fix(calendar): generate missing UID when importing calendar

pull/273/merge
Francis Lachapelle 2021-09-07 14:25:17 -04:00
parent 9f38201b6c
commit e43a721f77
1 changed files with 2 additions and 1 deletions

View File

@ -3367,7 +3367,8 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
// we generate a new UID based on a GUID
uid = [event uid];
if ([uid rangeOfCharacterFromSet: [NSCharacterSet characterSetWithCharactersInString: @"+/"]].location != NSNotFound)
if (![uid length] ||
[uid rangeOfCharacterFromSet: [NSCharacterSet characterSetWithCharactersInString: @"+/"]].location != NSNotFound)
{
uid = [self globallyUniqueObjectId];
[event setUid: uid];