X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/1c7242e61e9d71c7a37483ec0583dd0256f8ee7e..232eac919b067a3783348eab549c9fc555b80abd:/src/views-components/context-menu/actions/favorite-action.tsx

diff --git a/src/views-components/context-menu/actions/favorite-action.tsx b/src/views-components/context-menu/actions/favorite-action.tsx
index 05e03fb3..55fe8cfd 100644
--- a/src/views-components/context-menu/actions/favorite-action.tsx
+++ b/src/views-components/context-menu/actions/favorite-action.tsx
@@ -9,7 +9,7 @@ import { connect } from "react-redux";
 import { RootState } from "../../../store/store";
 
 const mapStateToProps = (state: RootState) => ({
-    isFavorite: state.contextMenu.resource && state.favorites[state.contextMenu.resource.uuid] === true
+    isFavorite: state.contextMenu.resource !== undefined && state.favorites[state.contextMenu.resource.uuid] === true
 });
 
 export const ToggleFavoriteAction = connect(mapStateToProps)((props: { isFavorite: boolean }) =>
