Skip to content

Commit

Permalink
Avoid javascript error when end date is left empty.
Browse files Browse the repository at this point in the history
This is caught when the focus leaves the field, but *this*
handler is triggered before that. Was making it possible to
save event with empty end field, since the javascript error was
preventing the later check from running.
  • Loading branch information
mrubinsk committed Jul 20, 2016
1 parent cb46752 commit cbb2533
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/kronolith.js
Expand Up @@ -6793,6 +6793,9 @@ KronolithCore = {
if (!date) {
date = end;
}
if (!date) {
return;
}
if (start.isAfter(end)) {
$('kronolithEventStartDate').setValue(date.toString(Kronolith.conf.date_format));
$('kronolithEventStartTime').setValue($F('kronolithEventEndTime'));
Expand Down

0 comments on commit cbb2533

Please sign in to comment.