File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
packages/neuron-ui/src/containers/Navbar Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -125,17 +125,7 @@ const Navbar = () => {
125125 return
126126 }
127127
128- // isUpdated is true or version is not empty means check update has return
129- if ( ! verifyCkbResult || ( isUpdated !== true && ! version ) ) {
130- return
131- }
132- if ( version && verifyCkbResult . shouldUpdate ) {
133- showGlobalAlertDialog ( {
134- type : 'warning' ,
135- message : t ( 'navbar.update-neuron-with-ckb' , { version : getVersion ( ) } ) ,
136- action : 'ok' ,
137- } ) ( dispatch )
138- } else if ( ! verifyCkbResult . ckbIsCompatible ) {
128+ if ( verifyCkbResult && ! verifyCkbResult . ckbIsCompatible ) {
139129 showGlobalAlertDialog ( {
140130 type : 'warning' ,
141131 message : (
@@ -152,6 +142,18 @@ const Navbar = () => {
152142 action : 'ok' ,
153143 } ) ( dispatch )
154144 }
145+
146+ // isUpdated is true or version is not empty means check update has return
147+ if ( ! verifyCkbResult || ( isUpdated !== true && ! version ) ) {
148+ return
149+ }
150+ if ( version && verifyCkbResult . shouldUpdate ) {
151+ showGlobalAlertDialog ( {
152+ type : 'warning' ,
153+ message : t ( 'navbar.update-neuron-with-ckb' , { version : getVersion ( ) } ) ,
154+ action : 'ok' ,
155+ } ) ( dispatch )
156+ }
155157 } , [ verifyCkbResult , version , isUpdated ] )
156158
157159 useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments