Skip to content

Commit

Permalink
fix(url-parser): remove comment, send error to cb
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessica Lord committed Nov 20, 2017
1 parent b8716c8 commit d44420b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/url_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ var ReadPreference = require('./read_preference'),
module.exports = function(url, options, callback) {
var result = parser.parse(url, true);
if (result.protocol !== 'mongodb:') {
// TODO fix this
if (result.protocol !== 'mongodb+srv:') {
throw new Error('invalid schema, expected mongodb or mongodb+srv');
callback(new Error('invalid schema, expected mongodb or mongodb+srv'));
}
}

Expand Down

0 comments on commit d44420b

Please sign in to comment.