Skip to content

Commit

Permalink
Add check for phoneInput
Browse files Browse the repository at this point in the history
  • Loading branch information
britneywwc committed Jan 14, 2025
1 parent d7819ca commit 0393a58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/js/src/prepare-form-inputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function isValidNumber(number) {
*/
function resetErrorState(errorElement, phoneInput) {
phoneInput?.parentNode?.parentNode.classList.remove("is-error");
phoneInput.removeAttribute("aria-describedby", "invalid-number-message");
phoneInput?.removeAttribute("aria-describedby", "invalid-number-message");
if (errorElement.parentNode) {
errorElement.remove();
}
Expand Down

0 comments on commit 0393a58

Please sign in to comment.