X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/fbaa1cdd31a8066e81a1114be2237ffdfdcbe910..fd44760652570645bb40ff9445bb5b9305a7fa1c:/src/views-components/context-menu/actions/collection-file-viewer-action.tsx?ds=sidebyside

diff --git a/src/views-components/context-menu/actions/collection-file-viewer-action.tsx b/src/views-components/context-menu/actions/collection-file-viewer-action.tsx
index f75da238..dfc9d14a 100644
--- a/src/views-components/context-menu/actions/collection-file-viewer-action.tsx
+++ b/src/views-components/context-menu/actions/collection-file-viewer-action.tsx
@@ -11,7 +11,9 @@ import { ContextMenuKind } from '~/views-components/context-menu/context-menu';
 const mapStateToProps = (state: RootState) => {
     const { resource } = state.contextMenu;
     const currentCollectionUuid = state.collectionPanel.item ? state.collectionPanel.item.uuid : '';
-    if (resource && resource.menuKind === ContextMenuKind.COLLECTION_FILES_ITEM) {
+    if (resource && (
+        resource.menuKind === ContextMenuKind.COLLECTION_FILES_ITEM ||
+        resource.menuKind === ContextMenuKind.READONLY_COLLECTION_FILES_ITEM)) {
         const file = getNodeValue(resource.uuid)(state.collectionPanelFiles);
         if (file) {
             return {
@@ -20,10 +22,8 @@ const mapStateToProps = (state: RootState) => {
                 currentCollectionUuid
             };
         }
-    } else {
-        return;
     }
-    return;
+    return {};
 };
 
 export const CollectionFileViewerAction = connect(mapStateToProps)(FileViewerAction);
