mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 14:15:52 +00:00
Guard the second manage-agents handler before its side effects too
The previous commit claimed both handlers, but only the first one changed: the search text expected `if (...) return;` on a single line while prettier had already wrapped it across two, so the second replacement silently matched nothing. A ctrl/cmd/shift-click on the collapsed-list entry therefore still closed the mobile nav and cleared the selected agent in the tab it left behind.
This commit is contained in:
1 parent
2da6445934
commit
f50df10311
1 file changed
+2
-2
@@ -646,11 +646,11 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
|
||||
to={AGENTS_MANAGE_ROOT}
|
||||
end
|
||||
onClick={(event) => {
|
||||
closeNavOnMobile();
|
||||
dispatch(setSelectedAgent(null));
|
||||
if (event.metaKey || event.ctrlKey || event.shiftKey)
|
||||
return;
|
||||
event.preventDefault();
|
||||
closeNavOnMobile();
|
||||
dispatch(setSelectedAgent(null));
|
||||
goToLevel(AGENTS_MANAGE_ROOT);
|
||||
}}
|
||||
className={({ isActive }) =>
|
||||
|
||||
Reference in new issue
Block a user