We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 758892b commit 6096afcCopy full SHA for 6096afc
lib/url_parser.js
@@ -10,7 +10,7 @@ var ReadPreference = require('./read_preference'),
10
module.exports = function(url, options, callback) {
11
var result = parser.parse(url, true);
12
if (result.protocol !== 'mongodb:' && result.protocol !== 'mongodb+srv:') {
13
- callback(new Error('invalid schema, expected mongodb or mongodb+srv'));
+ return callback(new Error('invalid schema, expected mongodb or mongodb+srv'));
14
}
15
16
if (result.protocol === 'mongodb+srv:') {
0 commit comments