File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ const TaskDetails = (props: Props) => {
1515
1616 if ( loading ) return < Spin /> ;
1717 if ( error ) return < Alert message = { error . message || String ( error ) } type = "error" showIcon /> ;
18- if ( ! todo ) return < > Not Found</ > ;
18+ // FIXME: more strict null case
19+ if ( ! todo || ! todo ?. id ) return < Alert message = "Task not found" type = "error" showIcon /> ;
1920 return < TaskCard { ...todo } /> ;
2021}
2122
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ const TasksList = () => {
3434 { loading && < Spin className = "loading--overlay" /> }
3535 < ul >
3636 { query ?. map ( ( task ) => (
37- < li > < TaskItem { ...task } /> </ li >
37+ < li key = { task ?. id } > < TaskItem { ...task } /> </ li >
3838 ) ) }
3939 { /* FIXME: yet (!query && !loading) */ }
4040 { query ?. length === 0 && (
You can’t perform that action at this time.
0 commit comments