Skip to content

Commit

Permalink
Newsletter: Retrieve current user email
Browse files Browse the repository at this point in the history
  • Loading branch information
mmtr committed Oct 3, 2024
1 parent 27be713 commit 9c736e0
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ domReady( function () {
// Injects loading animation in hidden state
button.insertAdjacentHTML( 'beforeend', spinner );

const currentUserEmail = form.querySelector( 'input[type=email]' )?.value ?? '';
if ( ! currentUserEmail ) {
console.log( 'hey!' );

Check failure on line 60 in projects/plugins/jetpack/extensions/blocks/subscriptions/view.js

View workflow job for this annotation

GitHub Actions / ESLint (non-excluded files only)

Unexpected console statement
}

form.addEventListener( 'submit', function ( event ) {
if ( form.resubmitted ) {
return;
Expand Down

0 comments on commit 9c736e0

Please sign in to comment.