Skip to content

Commit

Permalink
#103: Fix case where missing scheme sets parts.protocol = "".
Browse files Browse the repository at this point in the history
  • Loading branch information
djcsdy committed Aug 7, 2013
1 parent aa46a52 commit f596766
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/URI.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ URI.parse = function(string, parts) {
} else {
pos = string.indexOf(':');
if (pos > -1) {
parts.protocol = string.substring(0, pos);
parts.protocol = string.substring(0, pos) || null;
if (parts.protocol && !parts.protocol.match(URI.protocol_expression)) {
// : may be within the path
parts.protocol = undefined;
Expand Down

0 comments on commit f596766

Please sign in to comment.