From 2da23ec9a6399db5014e8799ab049019dd150661 Mon Sep 17 00:00:00 2001 From: AitBits Date: Sun, 16 Jul 2017 18:01:22 +0900 Subject: [PATCH 1/2] Fix crash when ESC is pressed on authentication. --- themes/default/js/greeter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/default/js/greeter.js b/themes/default/js/greeter.js index 5aeab3c..778e573 100644 --- a/themes/default/js/greeter.js +++ b/themes/default/js/greeter.js @@ -678,7 +678,7 @@ class Theme { this.selected_user = null; this.auth_pending = false; - if ( $( event.target ).hasClass( 'alert' ) ) { + if ( event != null && $( event.target ).hasClass( 'alert' ) ) { /* We were triggered by the authentication failed message being dismissed. * Keep the same account selected so user can retry without re-selecting an account. */ From c796b9731f4c8f9589f92a15405d9a0603b28fb3 Mon Sep 17 00:00:00 2001 From: AitBits Date: Sun, 16 Jul 2017 22:02:41 +0900 Subject: [PATCH 2/2] Made it simpler --- themes/default/js/greeter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/default/js/greeter.js b/themes/default/js/greeter.js index 778e573..2a3aac8 100644 --- a/themes/default/js/greeter.js +++ b/themes/default/js/greeter.js @@ -678,7 +678,7 @@ class Theme { this.selected_user = null; this.auth_pending = false; - if ( event != null && $( event.target ).hasClass( 'alert' ) ) { + if ( event && $( event.target ).hasClass( 'alert' ) ) { /* We were triggered by the authentication failed message being dismissed. * Keep the same account selected so user can retry without re-selecting an account. */