Skip to content

Commit

Permalink
If occurrence count is zero send nil
Browse files Browse the repository at this point in the history
  • Loading branch information
blehr authored and nickrandolph committed Jun 18, 2020
1 parent c0a775a commit fe932a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/Classes/SwiftDeviceCalendarPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public class SwiftDeviceCalendarPlugin: NSObject, FlutterPlugin {

var totalOccurrences: Int?
var endDate: Int64?
if(ekRecurrenceRule.recurrenceEnd?.occurrenceCount != nil) {
if(ekRecurrenceRule.recurrenceEnd?.occurrenceCount != nil && ekRecurrenceRule.recurrenceEnd?.occurrenceCount != 0) {
totalOccurrences = ekRecurrenceRule.recurrenceEnd?.occurrenceCount
}

Expand Down

0 comments on commit fe932a1

Please sign in to comment.