Skip to content

Commit

Permalink
corrected targetableobject being undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ehconitin committed Aug 16, 2024
1 parent 08c7947 commit 9867240
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import { AppPath } from '@/types/AppPath';
import { PageHotkeyScope } from '@/types/PageHotkeyScope';
import { SettingsPath } from '@/types/SettingsPath';
import { useSetHotkeyScope } from '@/ui/utilities/hotkey/hooks/useSetHotkeyScope';
import { useCleanRecoilState } from '~/hooks/useCleanRecoilState';
import { useIsMatchingLocation } from '~/hooks/useIsMatchingLocation';
import { usePageChangeEffectNavigateLocation } from '~/hooks/usePageChangeEffectNavigateLocation';
import { isDefined } from '~/utils/isDefined';
import { useCleanRecoilState } from '~/hooks/useCleanRecoilState';

// TODO: break down into smaller functions and / or hooks
// - moved usePageChangeEffectNavigateLocation into dedicated hook
Expand Down Expand Up @@ -153,7 +153,10 @@ export const PageChangeEffect = () => {
label: 'Create Task',
type: CommandType.Create,
Icon: IconCheckbox,
onCommandClick: () => openCreateActivity({ targetableObjects: [] }),
onCommandClick: () =>
openCreateActivity({
targetableObjects: [{ id: '', targetObjectNameSingular: '' }],
}),
},
]);
}, [addToCommandMenu, setToInitialCommandMenu, openCreateActivity]);
Expand Down

0 comments on commit 9867240

Please sign in to comment.