File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -322,8 +322,8 @@ function AppInner() {
322322 projectPath ,
323323 config . workspaces . slice ( ) . sort ( ( a , b ) => {
324324 // Extract workspace ID from path
325- const aId = a . path . replace ( / \\ / g, "/" ) . split ( "/" ) . pop ( ) || "" ;
326- const bId = b . path . replace ( / \\ / g, "/" ) . split ( "/" ) . pop ( ) || "" ;
325+ const aId = a . path . replace ( / \\ / g, "/" ) . split ( "/" ) . pop ( ) ?? "" ;
326+ const bId = b . path . replace ( / \\ / g, "/" ) . split ( "/" ) . pop ( ) ?? "" ;
327327 const aMeta = workspaceMetadata . get ( aId ) ;
328328 const bMeta = workspaceMetadata . get ( bId ) ;
329329 if ( ! aMeta || ! bMeta ) return 0 ;
@@ -378,7 +378,7 @@ function AppInner() {
378378 if ( ! targetWorkspace ) return ;
379379
380380 // Extract workspace ID from path
381- const workspaceId = targetWorkspace . path . replace ( / \\ / g, "/" ) . split ( "/" ) . pop ( ) || "" ;
381+ const workspaceId = targetWorkspace . path . replace ( / \\ / g, "/" ) . split ( "/" ) . pop ( ) ?? "" ;
382382 const metadata = workspaceMetadata . get ( workspaceId ) ;
383383 if ( ! metadata ) return ;
384384
Original file line number Diff line number Diff line change @@ -825,7 +825,7 @@ const ProjectSidebarInner: React.FC<ProjectSidebarProps> = ({
825825 // Extract workspace ID from path (path format: ~/.cmux/src/projectName/workspaceId)
826826 // Handle both Unix (/) and Windows (\) path separators
827827 const pathParts = workspace . path . replace ( / \\ / g, "/" ) . split ( "/" ) ;
828- const workspaceId = pathParts [ pathParts . length - 1 ] || "" ;
828+ const workspaceId = pathParts [ pathParts . length - 1 ] ?? "" ;
829829 const metadata = workspaceMetadata . get ( workspaceId ) ;
830830 if ( ! metadata ) return null ;
831831 const isSelected =
You can’t perform that action at this time.
0 commit comments