File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,14 @@ function decodeLink(url) {
2323 const isGithub = url . startsWith ( 'https://github.com/' ) ;
2424 if ( isGithub ) url = url . slice ( 'https://github.com/' . length ) ;
2525
26+ // if link is a Git URL
27+ if ( isGithub && url . endsWith ( '.git' ) ) {
28+
29+ // slice .git ending
30+ url = url . slice ( 0 , - ( '.git' . length ) ) ;
31+
32+ }
33+
2634
2735 let baseURL = 'https://codeit.codes' ;
2836 if ( isDev ) baseURL = 'https://dev.codeit.codes' ;
@@ -35,15 +43,6 @@ function decodeLink(url) {
3543 // if link exists
3644 if ( link . length > 1 ) {
3745
38- // if link is a Git URL
39- if ( isGithub && url . endsWith ( '.git' ) ) {
40-
41- // slice .git ending
42- url = url . slice ( 0 , - ( '.git' . length ) ) ;
43-
44- }
45-
46-
4746 linkData . user = link [ 0 ] ;
4847 linkData . repo = link [ 1 ] ;
4948
You can’t perform that action at this time.
0 commit comments