end_date有可能是null

This commit is contained in:
邱博亞 2023-09-10 08:58:45 +08:00
parent 026768323e
commit 1d33e33263
1 changed files with 7 additions and 3 deletions

View File

@ -280,7 +280,9 @@ class Event
end
tmp_start_date = [start_date, @start_date].max
@start_date += add_interval
@end_date += add_interval
if @end_date
@end_date += add_interval
end
new_end_date = has_recurring_end_date ? [re.recurring_end_date,end_date].min : end_date
need_check_hide = false
if tmp_hide_start.count != 0
@ -315,7 +317,7 @@ class Event
next
end
if new_start != org_start
new_end = @end_date + w.day
new_end = @end_date ? @end_date + w.day : nil
hide = need_check_hide && tmp_hide_start2.include?(new_start.strftime("%Y-%m-%d"))
if hide
if preserve_hide
@ -340,7 +342,9 @@ class Event
end
end
@start_date += interval
@end_date += interval
if @end_date
@end_date += interval
end
end
else
next