Skip to content

Commit

Permalink
fix(posthog-3000): Fixed trying to mount an undefined logic (#18905)
Browse files Browse the repository at this point in the history
Fixed trying to mount an undefined logic
  • Loading branch information
Gilbert09 authored Nov 27, 2023
1 parent d317283 commit 8d166e5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frontend/src/layout/navigation-3000/navigationLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -448,13 +448,14 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
},
],
sidebarContentsFlattened: [
(s) => [(state) => s.activeNavbarItem(state)?.logic.findMounted()?.selectors.contents(state) || null],
(s) => [(state) => s.activeNavbarItem(state)?.logic?.findMounted()?.selectors.contents(state) || null],
(sidebarContents): BasicListItem[] | ExtendedListItem[] =>
sidebarContents ? sidebarContents.flatMap((item) => ('items' in item ? item.items : item)) : [],
],
normalizedActiveListItemKey: [
(s) => [
(state) => s.activeNavbarItem(state)?.logic.findMounted()?.selectors.activeListItemKey?.(state) || null,
(state) =>
s.activeNavbarItem(state)?.logic?.findMounted()?.selectors.activeListItemKey?.(state) || null,
],
(activeListItemKey): string | number | string[] | null =>
activeListItemKey
Expand All @@ -474,7 +475,7 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
],
newItemCategory: [
(s) => [
(state) => s.activeNavbarItem(state)?.logic.findMounted()?.selectors.contents(state) || null,
(state) => s.activeNavbarItem(state)?.logic?.findMounted()?.selectors.contents(state) || null,
s.newItemInlineCategory,
router.selectors.location,
],
Expand Down

0 comments on commit 8d166e5

Please sign in to comment.