Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c87edb1

Browse files
author
Aaron O'Mullan
committed
Better string slicing in parse.git.githubID()
1 parent ef0468a commit c87edb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/parse/git.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function gitURL(path) {
2828
// Parse a git URL to a github ID : username/reponame
2929
function githubID(_url) {
3030
// Remove .git if it's in _url
31-
var sliceEnd = _url.slice(-4) === '.git' ? -4 : _url.length;
31+
var sliceEnd = _url.slice(-4) === '.git' ? -4 : undefined;
3232

3333
// Detect HTTPS repos
3434
var parsed = url.parse(_url);

0 commit comments

Comments
 (0)