Fixed possible undefined condition if element is not defined. (#1190)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net> Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
@@ -481,7 +481,7 @@ const ObjectDetails = ({
|
||||
},
|
||||
disableButtonFunction: (item: string) => {
|
||||
const element = versions.find((elm) => elm.version_id === item);
|
||||
return (element && element.is_delete_marker)
|
||||
return ((element && element.is_delete_marker) || false);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user