From 86ace2bf441875a5d759543fb36cb44a2bbf0819 Mon Sep 17 00:00:00 2001 From: Ahmad Al Haddad Date: Wed, 23 Sep 2020 22:28:40 +0300 Subject: [PATCH] Fix a bug in not removing item from path --- src/react-headless-nested-menu.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/react-headless-nested-menu.tsx b/src/react-headless-nested-menu.tsx index 9ec1437..a0cd2ff 100644 --- a/src/react-headless-nested-menu.tsx +++ b/src/react-headless-nested-menu.tsx @@ -66,6 +66,7 @@ const reducer = produce((draft: Draft, action: Action) => { case 'close-path': const index = draft.currentPath.indexOf(action.item.id) draft.currentPath.splice(index) + draft.currentPathItems.splice(index) break default: break