Merge pull request #406 from snakecase/patch-2
Fix check for an empty input or ESC key press
This commit is contained in:
commit
63e1268574
1 changed files with 2 additions and 2 deletions
|
@ -9,13 +9,13 @@ if (userName == 'Admin') {
|
|||
|
||||
if (pass == 'TheMaster') {
|
||||
alert( 'Welcome!' );
|
||||
} else if (pass == null) {
|
||||
} else if (pass == '' || pass == null) {
|
||||
alert( 'Canceled.' );
|
||||
} else {
|
||||
alert( 'Wrong password' );
|
||||
}
|
||||
|
||||
} else if (userName == null) {
|
||||
} else if (userName == '' || userName == null) {
|
||||
alert( 'Canceled' );
|
||||
} else {
|
||||
alert( "I don't know you" );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue