Skip to content

Commit abf95a7

Browse files
committed
fix
1 parent 9400d52 commit abf95a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web_src/js/features/repo-view-file-tree-sidebar.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ function extractPath(url) {
111111
const path = urlObj.pathname;
112112

113113
// Define a regular expression to match "/{param1}/{param2}/src/{branch}/{main}/"
114-
const regex = /^\/[^\/]+\/[^\/]+\/src\/[^\/]+\/[^\/]+\//;
114+
const regex = /^\/[^/]+\/[^/]+\/src\/[^/]+\/[^/]+\//;
115115

116116
// Use RegExp#exec() method to match the path
117117
const match = regex.exec(path);
118118
if (match) {
119-
return path.substring(match[0].length);
119+
return path.substring(match[0].length);
120120
}
121121

122122
// If the path does not match, return the original path

0 commit comments

Comments
 (0)