Skip to content

Commit

Permalink
fix(url parser): return callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessica Lord committed Nov 20, 2017
1 parent 758892b commit 6096afc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/url_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var ReadPreference = require('./read_preference'),
module.exports = function(url, options, callback) {
var result = parser.parse(url, true);
if (result.protocol !== 'mongodb:' && result.protocol !== 'mongodb+srv:') {
callback(new Error('invalid schema, expected mongodb or mongodb+srv'));
return callback(new Error('invalid schema, expected mongodb or mongodb+srv'));
}

if (result.protocol === 'mongodb+srv:') {
Expand Down

0 comments on commit 6096afc

Please sign in to comment.