21224: fixed random info button fail Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa...
[arvados.git] / services / workbench2 / src / store / details-panel / details-panel-action.ts
index bdfeaa18c1df60832eb5609b198cdf6533e9b5ad..1367d44613b8b785ca79eb16ba67ca3abc509557 100644 (file)
@@ -68,11 +68,9 @@ export const refreshCollectionVersionsList = (uuid: string) =>
 
 export const toggleDetailsPanel = (uuid: string = '') => (dispatch: Dispatch, getState: () => RootState) => {
     const { detailsPanel, router }= getState()
-    const currentRoute = router.location?.pathname.split('/') || [];
-    const currentItemUuid = currentRoute[currentRoute.length - 1];
     // because of material-ui issue resizing details panel breaks tabs.
     // triggering window resize event fixes that.
-    if(uuid !== detailsPanel.resourceUuid  && (detailsPanel.isOpened || uuid === currentItemUuid)){
+    if(uuid !== detailsPanel.resourceUuid  && detailsPanel.isOpened){
         dispatch<any>(loadDetailsPanel(uuid));
     } else {
         setTimeout(() => {