fix: Re-packaged application PKGBUILD and fixed error with empty calendar event names
This commit is contained in:
@@ -101,8 +101,14 @@ func FromVEvent(external *ics.VEvent) (event CalendarEvent, err error) {
|
||||
}
|
||||
case "CATEGORIES":
|
||||
dashIndex := strings.Index(prop.Value, "-")
|
||||
event.Category.ClassName = prop.Value[:dashIndex]
|
||||
event.Category.OtherData = prop.Value[dashIndex:]
|
||||
|
||||
// If there was no dash found, treat the property as its entire name
|
||||
if dashIndex == -1 {
|
||||
event.Category.ClassName = prop.Value
|
||||
} else {
|
||||
event.Category.ClassName = prop.Value[:dashIndex]
|
||||
event.Category.OtherData = prop.Value[dashIndex:]
|
||||
}
|
||||
default:
|
||||
panic("Unknown token when parsing event: " + prop.IANAToken)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user