File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -351,21 +351,21 @@ export default function DirectoryTreeContextualMenu(props: Readonly<DirectoryTre
351
351
) ;
352
352
case DialogsId . RENAME_DIRECTORY :
353
353
return (
354
- < RenameDialog
355
- message = "renameElementMsg"
356
- // @ts -expect-error TODO: manage null case(s) here
357
- currentName = { directory . elementName }
358
- open
359
- // @ts -expect-error TODO TS2345: Type undefined is not assignable to type UUID
360
- onClick = { ( newName : string ) => renameCB ( directory ?. elementUuid , newName ) }
361
- onClose = { handleCloseDialog }
362
- title = { intl . formatMessage ( {
363
- id : 'renameDirectoryDialogTitle' ,
364
- } ) }
365
- error = { renameState . errorMessage }
366
- type = { ElementType . DIRECTORY }
367
- parentDirectory = { directory ?. parentUuid }
368
- />
354
+ directory && (
355
+ < RenameDialog
356
+ message = "renameElementMsg"
357
+ currentName = { directory . elementName }
358
+ open
359
+ onClick = { ( newName : string ) => renameCB ( directory . elementUuid , newName ) }
360
+ onClose = { handleCloseDialog }
361
+ title = { intl . formatMessage ( {
362
+ id : 'renameDirectoryDialogTitle' ,
363
+ } ) }
364
+ error = { renameState . errorMessage }
365
+ type = { ElementType . DIRECTORY }
366
+ parentDirectory = { directory . parentUuid }
367
+ />
368
+ )
369
369
) ;
370
370
case DialogsId . DELETE_DIRECTORY :
371
371
return (
You can’t perform that action at this time.
0 commit comments