16743: Removed console.log's updated tests
[arvados.git] / src / views-components / side-panel-button / side-panel-button.tsx
index 07784c5ec3ffa20e4c41564d1dd9eb84fd1f772d..3ca2f0d66e95d4cc552c54a70ca27f4644063d96 100644 (file)
@@ -54,11 +54,12 @@ const transformOrigin: PopoverOrigin = {
     horizontal: 0
 };
 
-const isProjectTrashed = (proj: GroupResource, resources: ResourcesState): boolean => {
+export const isProjectTrashed = (proj: GroupResource | undefined, resources: ResourcesState): boolean => {
+    if (proj === undefined) { return false; }
     if (proj.isTrashed) { return true; }
     if (extractUuidKind(proj.ownerUuid) === ResourceKind.USER) { return false; }
     const parentProj = getResource<GroupResource>(proj.ownerUuid)(resources);
-    return isProjectTrashed(parentProj!, resources);
+    return isProjectTrashed(parentProj, resources);
 };
 
 export const SidePanelButton = withStyles(styles)(