diff --git a/src/Explorer/ContextMenuButtonFactory.tsx b/src/Explorer/ContextMenuButtonFactory.tsx index 426287068..22e587b00 100644 --- a/src/Explorer/ContextMenuButtonFactory.tsx +++ b/src/Explorer/ContextMenuButtonFactory.tsx @@ -85,11 +85,7 @@ export const createCollectionContextMenuButton = ( iconSrc: HostedTerminalIcon, onClick: () => { const selectedCollection: ViewModels.Collection = useSelectedNode.getState().findSelectedCollection(); - if (useNotebook.getState().isShellEnabled) { - container.openNotebookTerminal(ViewModels.TerminalKind.Mongo); - } else { - selectedCollection && selectedCollection.onNewMongoShellClick(); - } + selectedCollection && selectedCollection.onNewMongoShellClick(); }, label: useNotebook.getState().isShellEnabled ? "Open Mongo Shell" : "New Shell", }); diff --git a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx index c02639f09..e1af7c56a 100644 --- a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx +++ b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx @@ -166,11 +166,7 @@ export function createContextCommandBarButtons( iconAlt: label, onCommandClick: () => { const selectedCollection: ViewModels.Collection = selectedNodeState.findSelectedCollection(); - if (useNotebook.getState().isShellEnabled) { - container.openNotebookTerminal(ViewModels.TerminalKind.Mongo); - } else { - selectedCollection && selectedCollection.onNewMongoShellClick(); - } + selectedCollection && selectedCollection.onNewMongoShellClick(); }, commandButtonLabel: label, ariaLabel: label,