Skip to content

Commit 6096afc

Browse files
author
Jessica Lord
committed
fix(url parser): return callback
1 parent 758892b commit 6096afc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/url_parser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var ReadPreference = require('./read_preference'),
1010
module.exports = function(url, options, callback) {
1111
var result = parser.parse(url, true);
1212
if (result.protocol !== 'mongodb:' && result.protocol !== 'mongodb+srv:') {
13-
callback(new Error('invalid schema, expected mongodb or mongodb+srv'));
13+
return callback(new Error('invalid schema, expected mongodb or mongodb+srv'));
1414
}
1515

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

0 commit comments

Comments
 (0)