Skip to content

Commit 9a21a25

Browse files
committed
add a comment
1 parent 9919453 commit 9a21a25

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/renderer/features/task-detail/hooks/useTaskCreation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export function useTaskCreation({
5555
!editor.isEmpty;
5656

5757
const handleSubmit = useCallback(() => {
58+
// TRICKY: This needs to be redefined in the callback due to a weird issue where the callback uses a stale version of canSubmit, even if its a dependency
5859
const canSubmit =
5960
!!editor &&
6061
isAuthenticated &&

0 commit comments

Comments
 (0)