File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
apps/webapp/app/components/runs/v3 Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -91,15 +91,16 @@ export function TaskRunsTable({
9191 const { isManagedCloud } = useFeatures ( ) ;
9292 const { value } = useSearchParams ( ) ;
9393 const location = useOptimisticLocation ( ) ;
94- const rootOnly = value ( "rootOnly" ) ? `` : `rootOnly=${ rootOnlyDefault } ` ;
95- let search = rootOnly ? `${ rootOnly } &${ location . search } ` : location . search ;
94+ const params = new URLSearchParams ( location . search || "" ) ;
95+ if ( ! value ( "rootOnly" ) ) {
96+ params . set ( "rootOnly" , String ( rootOnlyDefault ) ) ;
97+ }
9698 if ( additionalTableState ) {
97- const params = new URLSearchParams ( search ) ;
9899 for ( const [ key , val ] of Object . entries ( additionalTableState ) ) {
99100 params . set ( key , val ) ;
100101 }
101- search = params . toString ( ) ;
102102 }
103+ const search = params . toString ( ) ;
103104 /** TableState has to be encoded as a separate URI component, so it's merged under one, 'tableState' param */
104105 const tableStateParam = disableAdjacentRows ? '' : encodeURIComponent ( search ) ;
105106
You can’t perform that action at this time.
0 commit comments