Skip to content

Commit

Permalink
typo in parseUrl error message (spotted thanks to #51)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcello Bastea-Forte committed Aug 30, 2011
1 parent a1af4a3 commit 1560fec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var UrlMatcher = /^(?:mongo:\/\/)?(?:([^:]+):([^@]+)@)?(.+?)(?::([0-9]+))?(?:\/(

function parseUrl(url) {
var match = UrlMatcher.exec(url)
if (!match || !match[3]) throw new Error("Invalid connection string: "+arg)
if (!match || !match[3]) throw new Error("Invalid connection string: " + url)
url = {}
if (match[1]) url.user = decodeURIComponent(match[1])
if (match[2]) url.password = decodeURIComponent(match[2])
Expand Down

0 comments on commit 1560fec

Please sign in to comment.