Bug 30650: Prevent browser crash if no pickup interval set
Don't get stuck in an infinite loop Signed-off-by: Koha Team University Lyon 3 <koha@univ-lyon3.fr> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
50f8cce211
commit
56e1ce35ab
|
|
@ -550,6 +550,10 @@
|
|||
|
||||
slots_per_day[dow].forEach(function(slot){
|
||||
let pickup_interval = policy.pickup_interval;
|
||||
if (!pickup_interval) {
|
||||
$('#pickup-times').html("<div>"+_("No pickup time define for this day.")+"</div>");
|
||||
return;
|
||||
}
|
||||
|
||||
let listStartMoment = selectedDate.hour(slot.start_hour).minute(slot.start_minute);
|
||||
let listEndMoment = selectedDate.hour(slot.end_hour).minute(slot.end_minute);
|
||||
|
|
|
|||
|
|
@ -310,6 +310,10 @@
|
|||
|
||||
policy.slots_per_day[dow].forEach(function(slot){
|
||||
let pickup_interval = policy.pickup_interval;
|
||||
if (!pickup_interval) {
|
||||
$('#pickup-times').html("<div>"+_("No pickup time define for this day.")+"</div>");
|
||||
return;
|
||||
}
|
||||
|
||||
let listStartMoment = selectedDate.hour(slot.start_hour).minute(slot.start_minute);
|
||||
let listEndMoment = selectedDate.hour(slot.end_hour).minute(slot.end_minute);
|
||||
|
|
|
|||
Loading…
Reference in New Issue