linfansen před 1 rokem
rodič
revize
e91e9b88ec
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      src/utils/index.js

+ 3 - 0
src/utils/index.js

@@ -365,6 +365,9 @@ export function transformToCron (startDate, endDate, dayOfWeek, executeTime) {
 }
 
 export function transformCron (cron) {
+  if (!cron || !cron[0]) {
+    return { dayOfWeek: '', executeTime: '' }
+  }
   const strArr = cron[0].split(' ')
   return {
     dayOfWeek: strArr[5],