Skip to content

Commit 27ca520

Browse files
committed
lessonsOnCurrentDateを非同期に修正
1 parent dbd0a14 commit 27ca520

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/pages/lesson/index.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,12 @@ export default Vue.extend({
237237
: dayjs(this.lesson.endTime).format('H:mm(M/D)')
238238
},
239239
},
240-
mounted() {
241-
this.$nextTick(function () {
242-
const data:
243-
| LessonWithId
244-
| undefined = vxm.classData.lessonsOnCurrentDate.find(
240+
async mounted() {
241+
const lessonList = await vxm.classData.lessonsOnCurrentDate(
242+
vxm.app.currentDate
243+
)
244+
await this.$nextTick(function () {
245+
const data: LessonWithId | undefined = lessonList.find(
245246
(e) => this.$route.query.lessonId === e.id
246247
) as LessonWithId | undefined
247248
this.lesson = data ?? this.dummyLesson

0 commit comments

Comments
 (0)