File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -108,12 +108,14 @@ module.exports = State.extend({
108108 switch ( action ) {
109109 case 'new connection clicked' :
110110 newState = 'NEW_EMPTY' ;
111+ view . message = '' ;
112+ // create new connection first
113+ view . connection = new Connection ( ) ;
114+ // the next lines will implicitly modify view.connection
111115 view . authMethod = 'NONE' ;
112116 view . sslMethod = 'NONE' ;
113- view . form . reset ( ) ;
114- view . message = '' ;
115- view . connection = null ;
116117 view . connectionName = '' ;
118+ view . form . reset ( ) ;
117119 break ;
118120 case 'favorite connection clicked' :
119121 newState = 'FAV_UNCHANGED' ;
Original file line number Diff line number Diff line change @@ -310,7 +310,6 @@ var ConnectView = View.extend({
310310 */
311311 createNewConnection : function ( ) {
312312 this . dispatch ( 'new connection clicked' ) ;
313- this . connection = new Connection ( ) ;
314313 } ,
315314
316315 /**
You can’t perform that action at this time.
0 commit comments