File tree Expand file tree Collapse file tree 2 files changed +13
-18
lines changed
src/sections/projectSection/components Expand file tree Collapse file tree 2 files changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -156,12 +156,13 @@ function Indicator({ projects, costs }) {
156156 return new Date ( b . last_updated ) - new Date ( a . last_updated ) ;
157157 } ) ;
158158
159- const set0 = newProjects . filter ( ( project ) => project . gsp . length === 0 ) ;
160- const set1 = newProjects . filter ( ( project ) => project . gsp [ 0 ] ?. g === 1 ) ;
161- const set2 = newProjects . filter ( ( project ) => project . gsp [ 0 ] ?. g === 2 ) ;
162- const set3 = newProjects . filter ( ( project ) => project . gsp [ 0 ] ?. g === 3 ) ;
163- const set4 = newProjects . filter ( ( project ) => project . gsp [ 0 ] ?. g === 4 ) ;
164- const set5 = newProjects . filter ( ( project ) => project . gsp [ 0 ] ?. g === 5 ) ;
159+ const set0 = newProjects . filter ( ( project ) => project . gsp . length === 0 ) ;
160+ const set1 = newProjects . filter ( ( project ) => project . gsp [ 0 ] && project . gsp [ 0 ] . g === 1 ) ;
161+ const set2 = newProjects . filter ( ( project ) => project . gsp [ 0 ] && project . gsp [ 0 ] . g === 2 ) ;
162+ const set3 = newProjects . filter ( ( project ) => project . gsp [ 0 ] && project . gsp [ 0 ] . g === 3 ) ;
163+ const set4 = newProjects . filter ( ( project ) => project . gsp [ 0 ] && project . gsp [ 0 ] . g === 4 ) ;
164+ const set5 = newProjects . filter ( ( project ) => project . gsp [ 0 ] && project . gsp [ 0 ] . g === 5 ) ;
165+
165166
166167
167168 const dropped = set1 . filter ( ( project ) => project . status == 0 ) ;
Original file line number Diff line number Diff line change @@ -322,13 +322,10 @@ function Readiness({ projects, costs }) {
322322 >
323323 < Avatar src = { institute . logo } /> { institute . title }
324324 </ TableCell >
325- < TableCell
326- className = { classes . tableFont }
327- align = "center"
328- >
329- { project . gsp [ 0 ] . g } .{ project . gsp [ 0 ] . s } .
330- { project . gsp [ 0 ] . p }
325+ < TableCell className = { classes . tableFont } align = "center" >
326+ { project . gsp [ 0 ] ? `${ project . gsp [ 0 ] . g } .${ project . gsp [ 0 ] . s } .${ project . gsp [ 0 ] . p } ` : '' }
331327 </ TableCell >
328+
332329 < TableCell
333330 className = { classes . tableFont }
334331 align = "right"
@@ -638,13 +635,10 @@ function Readiness({ projects, costs }) {
638635 >
639636 < Avatar src = { institute . logo } /> { institute . title }
640637 </ TableCell >
641- < TableCell
642- className = { classes . tableFont }
643- align = "center"
644- >
645- { project . gsp [ 0 ] . g } .{ project . gsp [ 0 ] . s } .
646- { project . gsp [ 0 ] . p }
638+ < TableCell className = { classes . tableFont } align = "center" >
639+ { project . gsp [ 0 ] ? `${ project . gsp [ 0 ] . g } .${ project . gsp [ 0 ] . s } .${ project . gsp [ 0 ] . p } ` : '' }
647640 </ TableCell >
641+
648642 < TableCell
649643 className = { classes . tableFont }
650644 align = "right"
You can’t perform that action at this time.
0 commit comments