From e513a20d07af48bbcb6bbb95bcff5f262f540b86 Mon Sep 17 00:00:00 2001 From: Kelly Dwan Date: Wed, 11 Dec 2019 16:08:36 -0500 Subject: [PATCH] Remove existing error messages before adding the latest response --- plugins/wporg-5ftf/assets/js/dialog.js | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/wporg-5ftf/assets/js/dialog.js b/plugins/wporg-5ftf/assets/js/dialog.js index 173a828..747008f 100644 --- a/plugins/wporg-5ftf/assets/js/dialog.js +++ b/plugins/wporg-5ftf/assets/js/dialog.js @@ -99,6 +99,7 @@ jQuery( document ).ready( function( $ ) { closeModal(); $( button ).after( $( '

' ).html( '' + response.message + '' ) ); } else { + $( 'div.notice' ).remove(); const $message = $( '

' ) .addClass( 'notice notice-alt' ) .addClass( response.success ? 'notice-success' : 'notice-error' )