Skip to content

Commit

Permalink
Fix a bug in not removing item from path
Browse files Browse the repository at this point in the history
  • Loading branch information
cdes committed Sep 23, 2020
1 parent 8e9bfdd commit 86ace2b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/react-headless-nested-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const reducer = produce((draft: Draft<NestedMenuState>, action: Action) => {
case 'close-path':
const index = draft.currentPath.indexOf(action.item.id)
draft.currentPath.splice(index)
draft.currentPathItems.splice(index)
break
default:
break
Expand Down

0 comments on commit 86ace2b

Please sign in to comment.