[epiphany/gnome-3-34] Fix password manager for forms with no username



commit d05815fa2e4829638a6a3bf2536da6ee0da08485
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Wed Feb 12 17:17:14 2020 -0600

    Fix password manager for forms with no username
    
    In 8036139d, I once again broke the password manager for forms with no
    username. I think I will continue to break the password manager every
    time I make any change to it, so long as we don't have any tests.
    
    This reverts 8036139d and ensures we pass along a null formAuth when
    there are no results, like we used to do.

 embed/web-process-extension/resources/js/ephy.js | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/embed/web-process-extension/resources/js/ephy.js 
b/embed/web-process-extension/resources/js/ephy.js
index 0f3526e09..41566ab1d 100644
--- a/embed/web-process-extension/resources/js/ephy.js
+++ b/embed/web-process-extension/resources/js/ephy.js
@@ -343,9 +343,7 @@ Ephy.PasswordManager = class PasswordManager
     {
         let element = this._takePendingPromise(id);
         if (element) {
-            if (username === '')
-                username = null;
-            if (password !== '')
+            if (password)
                 element.resolver({username, password});
             else
                 element.resolver(null);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]