Skip to content

Commit 493326d

Browse files
rueckstiesskangas
authored andcommitted
INT-939 🐛 saved connections lose auth specific values in UI
1 parent 4d70228 commit 493326d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/connect/behavior.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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';

src/connect/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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
/**

0 commit comments

Comments
 (0)