OSDN Git Service

fix init page bug
authorYongfeng LI <wliyongfeng@gmail.com>
Sat, 21 Apr 2018 02:37:00 +0000 (10:37 +0800)
committerYongfeng LI <wliyongfeng@gmail.com>
Sat, 21 Apr 2018 02:37:00 +0000 (10:37 +0800)
src/features/app/components/Register/Register.jsx

index 1c2eb5e..9d8320e 100644 (file)
@@ -87,7 +87,7 @@ class Register extends React.Component {
         </div>
 
         {
-          this.state.init &&
+          this.state && this.state.init &&
           <div>
             <h2 className={styles.title}>{lang === 'zh' ? '初始账户和密钥' : 'Init your account and key'}</h2>
             <div className={styles.form}>
@@ -125,7 +125,7 @@ class Register extends React.Component {
           </div>
         }
         {
-          !this.state.init &&
+          this.state && !this.state.init &&
           <div>
             <h2 className={styles.title}>{lang === 'zh' ? '恢复钱包' : 'Restore wallet'}</h2>
             <div className={styles.form}>