mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 10:46:06 +02:00
Use querySelectorAll
This commit is contained in:
parent
a9253b6689
commit
3d7c651c72
1 changed files with 1 additions and 1 deletions
|
@ -286,7 +286,7 @@ function removeFormErrors(input, removeStaleAlerts=false){
|
|||
}
|
||||
|
||||
if (removeStaleAlerts){
|
||||
let staleAlerts = Array.from(document.getElementsByClassName("usa-alert--error"))
|
||||
let staleAlerts = document.querySelectorAll(".usa-alert--error")
|
||||
for (let alert of staleAlerts){
|
||||
// Don't remove the error associated with the input
|
||||
if (alert.id !== `${input.id}--toast`) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue