From a37cf9170283dd8bd4c6e2c60bb6db0c8c0287ea Mon Sep 17 00:00:00 2001 From: Adam Rashid Date: Tue, 7 Feb 2023 21:35:13 +0800 Subject: [PATCH] fix: handle duplicate edge case for sidebar loading This changes the SideBar's data prop to be filtered by id instead of key. fixes issue #308 --- frontend/src/pages/dashboard/[id].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/dashboard/[id].tsx b/frontend/src/pages/dashboard/[id].tsx index d5b26c2f5a..180fc493f9 100644 --- a/frontend/src/pages/dashboard/[id].tsx +++ b/frontend/src/pages/dashboard/[id].tsx @@ -549,7 +549,7 @@ export default function Dashboard() { toggleSidebar={toggleSidebar} data={data.filter( (row: SecretDataProps) => - row.key === data.filter((r) => r.id === sidebarSecretId)[0]?.key + row.id === sidebarSecretId )} modifyKey={listenChangeKey} modifyValue={listenChangeValue}