View | Details | Raw Unified | Return to bug 37618
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js (-2 / +9 lines)
Lines 212-218 $("#placeBookingModal").on("show.bs.modal", function (e) { Link Here
212
212
213
        $pickupSelect.prop("disabled", false);
213
        $pickupSelect.prop("disabled", false);
214
214
215
        // If filtered_pickup_locations contain the booking_patron's home library, use it as the default for pickup_library_id
215
        /* If there are no filtered_pickup_locations, clear the picker
216
         * and return early without trying to set a default. */
217
        if (!filtered_pickup_locations.length && !pickup_library_id) {
218
            $pickupSelect.val(null).trigger("change");
219
            return;
220
        }
221
222
        /* If filtered_pickup_locations contain the booking_patron's home library,
223
         * use it as the default for pickup_library_id. */
216
        pickup_library_id ??= filtered_pickup_locations.find(
224
        pickup_library_id ??= filtered_pickup_locations.find(
217
            pickup_location =>
225
            pickup_location =>
218
                pickup_location.library_id ===
226
                pickup_location.library_id ===
219
- 

Return to bug 37618