linfansen hace 1 año
padre
commit
e91e9b88ec
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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],