From 312a706d00aa56e07796541dde2589351288eff6 Mon Sep 17 00:00:00 2001 From: ArtemB Date: Thu, 1 Aug 2024 17:06:05 +0300 Subject: [PATCH] 1.1.55 fix function selectItemAddrPoint on main page --- static/js/user_profile.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/static/js/user_profile.js b/static/js/user_profile.js index f9e0be9..da4b825 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -351,7 +351,7 @@ function selectItemAddrPoint(id, name, ctrl_name, city_DT){ let tap_txt_cont = document.querySelector("#id_" + ctrl_name); let local_city_time = document.querySelector(".local_city_time"); - if(ctrl_name === "from_address_point_txt"){ + if(ctrl_name === "from_address_point_txt" && local_city_time){ local_city_time.innerHTML = city_DT; } @@ -361,8 +361,11 @@ function selectItemAddrPoint(id, name, ctrl_name, city_DT){ let tap_cont = document.querySelector("#id_" + ctrl_name.slice(0, -4)); tap_cont.value = id; - init_departure_DT() - init_arrival_DT() + if (local_city_time){ + init_departure_DT() + init_arrival_DT() + } + if (tap_txt_cont.classList.contains('red_text')){ tap_txt_cont.classList.remove('red_text')