Skip to content

Commit d44420b

Browse files
author
Jessica Lord
committed
fix(url-parser): remove comment, send error to cb
1 parent b8716c8 commit d44420b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/url_parser.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ var ReadPreference = require('./read_preference'),
1010
module.exports = function(url, options, callback) {
1111
var result = parser.parse(url, true);
1212
if (result.protocol !== 'mongodb:') {
13-
// TODO fix this
1413
if (result.protocol !== 'mongodb+srv:') {
15-
throw new Error('invalid schema, expected mongodb or mongodb+srv');
14+
callback(new Error('invalid schema, expected mongodb or mongodb+srv'));
1615
}
1716
}
1817

0 commit comments

Comments
 (0)