TRI-265 adding checks to eliminate getting null at classList.add
This commit is contained in:
@@ -23,8 +23,15 @@ function SendRegistrationForm(el, user_id){
|
||||
data: formData,
|
||||
success: function(data){
|
||||
|
||||
document.getElementById('confirm_password').innerHTML = data.message
|
||||
document.querySelector('.info_text').classList.add('show')
|
||||
const confirmPasswordElement = document.getElementById('confirm_password');
|
||||
if (confirmPasswordElement) {
|
||||
confirmPasswordElement.innerHTML = data.message;
|
||||
}
|
||||
|
||||
const infoTextElement = document.querySelector('.info_text');
|
||||
if (infoTextElement) {
|
||||
infoTextElement.classList.add('show');
|
||||
}
|
||||
// location.href = `/profile/page/dashboard/`
|
||||
window.sessionStorage.removeItem('mailingSubscribeRequired')
|
||||
window.sessionStorage.removeItem('email')
|
||||
|
||||
Reference in New Issue
Block a user