File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/web/src/app/[domain]/browse/hooks Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -23,15 +23,17 @@ export const useBrowseParams = () => {
23
23
const { path, pathType } = ( ( ) : { path : string , pathType : 'tree' | 'blob' } => {
24
24
const path = rawPath . substring ( sentinalIndex + '/-/' . length ) ;
25
25
const pathType = path . startsWith ( 'tree/' ) ? 'tree' : 'blob' ;
26
+
27
+ // @note : decodedURIComponent is needed here incase the path contains a space.
26
28
switch ( pathType ) {
27
29
case 'tree' :
28
30
return {
29
- path : path . substring ( 'tree/' . length ) ,
31
+ path : decodeURIComponent ( path . substring ( 'tree/' . length ) ) ,
30
32
pathType,
31
33
} ;
32
34
case 'blob' :
33
35
return {
34
- path : path . substring ( 'blob/' . length ) ,
36
+ path : decodeURIComponent ( path . substring ( 'blob/' . length ) ) ,
35
37
pathType,
36
38
} ;
37
39
}
You can’t perform that action at this time.
0 commit comments