diff options
author | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-06-16 17:48:18 -0700 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-06-16 17:48:18 -0700 |
commit | c87edb155accb043a058f99b42ceb25e7abf7878 (patch) | |
tree | c5e5615aca40d9be3b95bd42903f07c39789d7af /lib/parse | |
parent | ef0468ad5d8f9fc820efa611bad889a6538ea99e (diff) | |
download | gitbook-c87edb155accb043a058f99b42ceb25e7abf7878.zip gitbook-c87edb155accb043a058f99b42ceb25e7abf7878.tar.gz gitbook-c87edb155accb043a058f99b42ceb25e7abf7878.tar.bz2 |
Better string slicing in parse.git.githubID()
Diffstat (limited to 'lib/parse')
-rw-r--r-- | lib/parse/git.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/parse/git.js b/lib/parse/git.js index 4478f20..18a7cd3 100644 --- a/lib/parse/git.js +++ b/lib/parse/git.js @@ -28,7 +28,7 @@ function gitURL(path) { // Parse a git URL to a github ID : username/reponame function githubID(_url) { // Remove .git if it's in _url - var sliceEnd = _url.slice(-4) === '.git' ? -4 : _url.length; + var sliceEnd = _url.slice(-4) === '.git' ? -4 : undefined; // Detect HTTPS repos var parsed = url.parse(_url); |