Skip to content

Commit

Permalink
fix(form): check if form has a spinner before remove action
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Aug 8, 2024
1 parent 508ea5a commit a417791
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/blocks/frontend/form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ const makeSpinner = ( anchor ) => {
anchor.appendChild( spinner );
},
hide: () => {
anchor.removeChild( spinner );
if ( anchor.contains( spinner ) ) {
anchor.removeChild( spinner );
}
}
};
};
Expand Down

0 comments on commit a417791

Please sign in to comment.