File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ const TaskRunsCard: FC<Props> = ({task}) => {
4545 const members = useSelector ( ( state : AppState ) => state . resources . members . byID )
4646 const org = useSelector ( getOrg )
4747 const history = useHistory ( )
48- const [ route , setRoute ] = useState ( `/orgs/${ org . id } /tasks/${ task . id } /edit` )
48+ const [ route , setRoute ] = useState ( `/orgs/${ org ? .id } /tasks/${ task ? .id } /edit` )
4949 const changeToggle = ( ) => {
5050 dispatch (
5151 updateTaskStatus ( {
@@ -81,6 +81,10 @@ const TaskRunsCard: FC<Props> = ({task}) => {
8181 return
8282 }
8383
84+ if ( ! task ) {
85+ return
86+ }
87+
8488 fetch ( `/api/v2private/notebooks/resources?type=tasks&resource=${ task . id } ` , {
8589 method : 'GET' ,
8690 headers : {
@@ -101,7 +105,7 @@ const TaskRunsCard: FC<Props> = ({task}) => {
101105 . catch ( ( ) => {
102106 setRoute ( `/notebook/from/task/${ task . id } ` )
103107 } )
104- } , [ isFlagEnabled ( 'createWithFlows' ) ] )
108+ } , [ isFlagEnabled ( 'createWithFlows' ) , task ] )
105109
106110 if ( ! task ) {
107111 return null
You can’t perform that action at this time.
0 commit comments