Skip to content

Commit

Permalink
replace entire dynamicNavItems state for ADD_NAV_ITEM
Browse files Browse the repository at this point in the history
  • Loading branch information
fschade committed Dec 7, 2020
1 parent 6140a2d commit 9fdc5d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const mutations = {
* @constructor
*/
ADD_NAV_ITEM(state, { extension, navItem }) {
const dynamicNavItems = state.dynamicNavItems
const dynamicNavItems = { ...state.dynamicNavItems }
dynamicNavItems[extension] = dynamicNavItems[extension] || []
const index = dynamicNavItems[extension].findIndex(item => item.name === navItem.name)
if (index >= 0) {
Expand Down

0 comments on commit 9fdc5d1

Please sign in to comment.