From 46804fab7b9245b3e34312a2c81ec8772def8265 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 16 Nov 2020 10:16:48 +0200 Subject: [PATCH] Do not make a request to the server if there's no service or provider selection --- assets/js/frontend_book_api.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/js/frontend_book_api.js b/assets/js/frontend_book_api.js index eb177b02..5fc207dd 100755 --- a/assets/js/frontend_book_api.js +++ b/assets/js/frontend_book_api.js @@ -229,6 +229,10 @@ window.FrontendBookApi = window.FrontendBookApi || {}; return; } + if (!providerId || !serviceId) { + return; + } + var appointmentId = FrontendBook.manageMode ? GlobalVariables.appointmentData.id : null; var url = GlobalVariables.baseUrl + '/index.php/appointments/ajax_get_unavailable_dates';