linfansen 1 rok pred
rodič
commit
e91e9b88ec
1 zmenil súbory, kde vykonal 3 pridanie a 0 odobranie
  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],