FIX: ensures recurring works when time is specified

FIX: ensures recurring works when time is specified

diff --git a/assets/javascripts/initializers/discourse-calendar.js.es6 b/assets/javascripts/initializers/discourse-calendar.js.es6
index af5993a..a4bda27 100644
--- a/assets/javascripts/initializers/discourse-calendar.js.es6
+++ b/assets/javascripts/initializers/discourse-calendar.js.es6
@@ -246,14 +246,15 @@ function initializeDiscourseCalendar(api) {
       }
     } else {
       event.allDay = true;
-      if (from.weeklyRecurring) {
-        event.startTime = {
-          hours: from.dateTime.hours(),
-          minutes: from.dateTime.minutes(),
-          seconds: from.dateTime.seconds()
-        };
-        event.daysOfWeek = [from.dateTime.isoWeekday()];
-      }
+    }
+
+    if (from.weeklyRecurring) {
+      event.startTime = {
+        hours: from.dateTime.hours(),
+        minutes: from.dateTime.minutes(),
+        seconds: from.dateTime.seconds()
+      };
+      event.daysOfWeek = [from.dateTime.isoWeekday()];
     }
 
     return event;

GitHub sha: 5d351f6e

1 Like