From 569ccb3c1ff82f30ffefa7d3700571448d742662 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 03 十二月 2020 11:46:28 +0800
Subject: [PATCH] 2020-12-03

---
 src/components/header/loginform.jsx |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/components/header/loginform.jsx b/src/components/header/loginform.jsx
index e887b12..7010577 100644
--- a/src/components/header/loginform.jsx
+++ b/src/components/header/loginform.jsx
@@ -32,9 +32,7 @@
     if (e.target.value) {
       if (!this.props.form.getFieldValue(key)) {
         const input = document.getElementById(key)
-        if (input) {
-          input.focus()
-        }
+        input && input.focus()
         return
       }
       this.props.handleSubmit()
@@ -45,9 +43,7 @@
 
   componentDidMount () {
     const input = document.getElementById('username')
-    if (input) {
-      input.focus()
-    }
+    input && input.focus()
   }
 
   render() {

--
Gitblit v1.8.0