Skip to content

Commit

Permalink
Merge pull request #66 from SamMorrowDrums/master
Browse files Browse the repository at this point in the history
Enable user to pass fully formed URI
  • Loading branch information
mrhooray committed Apr 27, 2016
2 parents 3d32289 + 03c241b commit d714120
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function toURL(path, query) {
parsed.query = extend(parsed.query, query);
parsed.search = null;

if (parsed.protocol === 'http:' ) {
if (['http:', 'https:', 'file:'].indexOf(parsed.protocol) > 0) {
return url.format(parsed);
} else {
return fileURL(url.format(parsed));
Expand Down

0 comments on commit d714120

Please sign in to comment.