[epiphany/mcatanzaro/passwords: 31/35] ephy.js: Simplify a condition



commit e9ed23be2d0193b2c83b76894a2f5241302bad7f
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sun Mar 3 16:47:18 2019 -0600

    ephy.js: Simplify a condition

 embed/web-extension/resources/js/ephy.js | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/embed/web-extension/resources/js/ephy.js b/embed/web-extension/resources/js/ephy.js
index 3bd198e31..3292c77e0 100644
--- a/embed/web-extension/resources/js/ephy.js
+++ b/embed/web-extension/resources/js/ephy.js
@@ -484,10 +484,7 @@ Ephy.FormManager = class FormManager
     handleFormSubmission()
     {
         this._formAuth = this._generateFormAuth(false);
-        if (!this._formAuth)
-            return;
-
-        if (!this._formAuth.password)
+        if (!this._formAuth || !this._formAuth.password)
             return;
 
         let permission = Ephy.permissionsManager.permission(Ephy.PermissionType.SAVE_PASSWORD, 
this._formAuth.origin);


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