diff --git a/src/Explorer/Panes/PanelContainerComponent.tsx b/src/Explorer/Panes/PanelContainerComponent.tsx index 6d5de0af2..51c3e7b29 100644 --- a/src/Explorer/Panes/PanelContainerComponent.tsx +++ b/src/Explorer/Panes/PanelContainerComponent.tsx @@ -78,7 +78,8 @@ export class PanelContainerComponent extends React.Component): void => { - const targetElementDataTest: string | undefined = useSelectedNode.getState().findSelectedCollection().id(); + const collection = useSelectedNode.getState().findSelectedCollection(); + const targetElementDataTest: string | undefined = collection.id(); const targetElement: HTMLElement | null = document.querySelector(`[data-test="${targetElementDataTest}"]`); if (ev && (ev.target as HTMLElement).id === "notificationConsoleHeader") { ev.preventDefault();