WordPress.org

Make WordPress Core

Ticket #52573: 52573.diff

File 52573.diff, 608 bytes (added by audrasjb, 7 months ago)
  • src/js/_enqueues/admin/user-profile.js

    diff --git a/src/js/_enqueues/admin/user-profile.js b/src/js/_enqueues/admin/user-profile.js
    index dfec0fdba2..a601b3fc57 100644
    a b  
    141141                resultDiv.addClass( 'notice-' + ( success ? 'success' : 'error' ) );
    142142
    143143                // Add the message, wrapping in a p tag, with a fadein to highlight each message.
     144                if ( success !== 'success' ) {
     145                        message = message[0].message;
     146                }
    144147                resultDiv.text( $( $.parseHTML( message ) ).text() ).wrapInner( '<p />');
    145148
    146149                // Disable the button when the callback has succeeded.