Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(modals): If statement have duplicate bodies. #469

Merged
merged 1 commit into from
Mar 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
🐛 fix(modals): If statement have duplicate bodies.
  • Loading branch information
iamleigh committed Mar 2, 2022
commit 49d3e940fa3fc79560ef26df8fa6144b3f4a381a
7 changes: 4 additions & 3 deletions assets/js/showcase/pages/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,10 @@
}

// Focus error field.
if ( '' === clientId.val() && '' === clientSe.val() ) {
clientId.focus();
} else if ( '' === clientId.val() && '' !== clientSe.val() ) {
if (
( '' === clientId.val() && '' === clientSe.val() ) ||
( '' === clientId.val() && '' !== clientSe.val() )
) {
clientId.focus();
} else if ( '' !== clientId.val() && '' === clientSe.val() ) {
clientSe.focus();
Expand Down