From bad6b9ce76cbbbfd16fe991dda36d1ccbadf82fd Mon Sep 17 00:00:00 2001 From: Sanasol Date: Fri, 8 Jun 2018 18:23:52 +0300 Subject: [PATCH] skip days that doesnt exists --- web/src/components/CourseRedactor.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/src/components/CourseRedactor.vue b/web/src/components/CourseRedactor.vue index 608e20e6..a2fa6ced 100644 --- a/web/src/components/CourseRedactor.vue +++ b/web/src/components/CourseRedactor.vue @@ -948,10 +948,12 @@ console.log('data', i, now.getDay(), weekday, now, moment(now).format("D MMM")); - options.push({ - title: `${schedule[weekday]} (${this.weekdays[weekday]}, ${moment(now).format("D MMM")})`, - value: moment(now).format('YYYY-MM-DD') - }); + if(schedule[weekday]) { + options.push({ + title: `${schedule[weekday]} (${this.weekdays[weekday]}, ${moment(now).format("D MMM")})`, + value: moment(now).format('YYYY-MM-DD') + }); + } } console.log('options',options);