Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: select only 1 shortcut at a time

thecodrre5b1621b90ba
diff --git a/apps/web/src/components/navigation-menu/index.js b/apps/web/src/components/navigation-menu/index.js
index 195708d5a..56272d716 100644
--- a/apps/web/src/components/navigation-menu/index.js
+++ b/apps/web/src/components/navigation-menu/index.js
@@ -17,11 +17,11 @@ import { useLocation } from "wouter";
function shouldSelectNavItem(route, pin) {
if (pin.type === "notebook") {
- return route.startsWith(`/notebooks/${pin.id}`);
+ return route === `/notebooks/${pin.id}`;
} else if (pin.type === "topic") {
- return route.startsWith(`/notebooks/${pin.notebookId}/${pin.id}`);
+ return route === `/notebooks/${pin.notebookId}/${pin.id}`;
} else if (pin.type === "tag") {
- return route.startsWith(`/tags/${pin.id}`);
+ return route === `/tags/${pin.id}`;
}
}