Skip to content

Commit 21b139c

Browse files
committed
🐛 fix auth input fields not visible
1 parent 5c93f61 commit 21b139c

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

src/connect/connect-form-view.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,9 @@ var ConnectFormView = FormView.extend({
3333
// get auth mechanism from parent view
3434
obj.authentication = this.parent.authMethod;
3535

36-
// is SSL enabled (options are open)
37-
// obj.ssl = this.parent.sslOpen;
38-
3936
// fill in all default fields
4037
obj.hostname = obj.hostname || 'localhost';
41-
obj.port = obj.port || 27017;
42-
43-
// port number must be numeric
44-
obj.port = Number(obj.port);
45-
46-
if (obj.authentication !== 'NONE') {
47-
// default fields for auth
48-
obj.database_name = obj.database_name || 'admin';
49-
}
38+
obj.port = parseInt(obj.port || 27017, 10);
5039

5140
return obj;
5241
},

src/connect/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ var ConnectView = View.extend({
161161
evt.preventDefault();
162162
this.toggle('authOpen');
163163
if (this.authOpen) {
164-
this.authMethod = this.previousAuthMethod || 'MONGODB';
164+
this.authMethod = 'MONGODB';
165165
} else {
166166
this.authMethod = 'NONE';
167167
}

0 commit comments

Comments
 (0)