Commit 8253b6f9 authored by jackie / Andrea Ida Malkah Klaura's avatar jackie / Andrea Ida Malkah Klaura
Browse files

FIX: check if timeslots loaded before accessing length property

parent ea4c4422
......@@ -27,7 +27,13 @@
<div v-if="schedule.rrule === 1">
<p>
This is a single emission.
<span v-if="!loaded.scheduleTimeslots"><br>... checking for timeslots ...</span>
<span v-if="!loaded.scheduleTimeslots">
<br>
<img
src="../assets/radio.gif"
alt="loading schedule data"
>
</span>
<span v-else>
<span v-if="scheduleTimeslots.length > 1">
But due to a previous conflict resolution there is a second timeslot, from
......@@ -74,9 +80,17 @@
size="sm"
@click="deleteFullSchedule(schedule.id)"
>
<span v-if="schedule.rrule === 1 && scheduleTimeslots.length === 1">Delete</span>
<span v-else-if="schedule.rrule === 1">Delete both</span>
<span v-else>Delete schedule + all timeslots</span>
<div v-if="loaded.scheduleTimeslots">
<span v-if="schedule.rrule === 1 && scheduleTimeslots.length === 1">Delete</span>
<span v-else-if="schedule.rrule === 1">Delete both</span>
<span v-else>Delete schedule + all timeslots</span>
</div>
<div v-else>
<img
src="../assets/radio.gif"
alt="loading schedule data"
>
</div>
</b-button>
<b-button
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment