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 = () => {
2323 const { path, pathType } = ( ( ) : { path : string , pathType : 'tree' | 'blob' } => {
2424 const path = rawPath . substring ( sentinalIndex + '/-/' . length ) ;
2525 const pathType = path . startsWith ( 'tree/' ) ? 'tree' : 'blob' ;
26+
27+ // @note : decodedURIComponent is needed here incase the path contains a space.
2628 switch ( pathType ) {
2729 case 'tree' :
2830 return {
29- path : path . substring ( 'tree/' . length ) ,
31+ path : decodeURIComponent ( path . substring ( 'tree/' . length ) ) ,
3032 pathType,
3133 } ;
3234 case 'blob' :
3335 return {
34- path : path . substring ( 'blob/' . length ) ,
36+ path : decodeURIComponent ( path . substring ( 'blob/' . length ) ) ,
3537 pathType,
3638 } ;
3739 }
You can’t perform that action at this time.
0 commit comments