Skip to content

Commit

Permalink
fix: undefined reading 'app'
Browse files Browse the repository at this point in the history
  • Loading branch information
zovomat committed Mar 29, 2022
1 parent 099ae90 commit 8d9069f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/search/module-selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export const ModuleSelector: FC<{ activeRoute: AppRoute; disabled: boolean }> =

useEffect(() => {
if (activeRoute?.app !== SEARCH_APP_ID) {
if (!fullModule || fullModule.app !== activeRoute.app) {
updateModule((modules.find((m) => m.app === activeRoute.app) ?? modules[0])?.route);
if (!fullModule || fullModule?.app !== activeRoute?.app) {
updateModule((modules.find((m) => m.app === activeRoute?.app) ?? modules[0])?.route);
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down

0 comments on commit 8d9069f

Please sign in to comment.