Skip to content

Commit c288628

Browse files
Users: Move form serialize into generatePassword()
1 parent 45a4fe0 commit c288628

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/js/_enqueues/admin/user-profile.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,17 @@
6060
if ( 'mailserver_pass' !== $pass1.prop('id' ) && ! $('#weblog_title').length ) {
6161
$( $pass1 ).trigger( 'focus' );
6262
}
63+
64+
if ( $form && $form.length ) {
65+
originalFormContent = $form.serialize();
66+
}
6367
}
6468

6569
function bindPass1() {
6670
currentPass = $pass1.val();
6771

6872
if ( 1 === parseInt( $pass1.data( 'reveal' ), 10 ) ) {
6973
generatePassword();
70-
originalFormContent = $form.serialize();
7174
}
7275

7376
$pass1.on( 'input' + ' pwupdate', function () {

0 commit comments

Comments
 (0)