File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/desktop/src/pages Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,10 @@ export default function Layout(props: ParentProps) {
2222 const layout = useLayout ( )
2323 const currentDirectory = createMemo ( ( ) => base64Decode ( params . dir ?? "" ) )
2424 const sessions = createMemo ( ( ) => globalSync . child ( currentDirectory ( ) ) [ 0 ] . session ?? [ ] )
25- const currentSession = createMemo ( ( ) => sessions ( ) . find ( ( s ) => s . id === params . id ) ?? sessions ( ) . at ( 0 ) )
25+ const currentSession = createMemo ( ( ) => sessions ( ) . find ( ( s ) => s . id === params . id ) )
2626
2727 function navigateToSession ( session : Session | undefined ) {
28+ if ( ! session ) return
2829 navigate ( `/${ params . dir } /session/${ session ?. id } ` )
2930 }
3031
@@ -59,6 +60,7 @@ export default function Layout(props: ParentProps) {
5960 < Select
6061 options = { sessions ( ) }
6162 current = { currentSession ( ) }
63+ placeholder = "Select session"
6264 label = { ( x ) => x . title }
6365 value = { ( x ) => x . id }
6466 onSelect = { navigateToSession }
You can’t perform that action at this time.
0 commit comments