File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1401,7 +1401,7 @@ useMutation(updateTodo, {
14011401 return () => queryCache .setQueryData (' todos' , previousTodos)
14021402 },
14031403 // If the mutation fails, use the value returned from onMutate to roll back
1404- onError : (err , newTodo , rollback ) => rollback
1404+ onError : (err , newTodo , rollback ) => rollback (),
14051405 // Always refetch after error or success:
14061406 onSettled : () => {
14071407 queryCache .refetchQueries (' todos' )
@@ -1425,7 +1425,7 @@ useMutation(updateTodo, {
14251425 return () => queryCache .setQueryData ([' todos' , newTodo .id ], previousTodo)
14261426 },
14271427 // If the mutation fails, use the rollback function we returned above
1428- onError : (err , newTodo , rollback ) => rollback ()
1428+ onError : (err , newTodo , rollback ) => rollback (),
14291429 // Always refetch after error or success:
14301430 onSettled : () => {
14311431 queryCache .refetchQueries ([' todos' , newTodo .id ])
You can’t perform that action at this time.
0 commit comments