Merge branch 'master' into 13854-tags-card
[arvados-workbench2.git] / src / views-components / context-menu / actions / favorite-action.tsx
index 05e03fb34b754456c76a13787e5e15b02695b767..55fe8cfdba19efe1c42b088e7ccc87471aaea97f 100644 (file)
@@ -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 }) =>