File tree Expand file tree Collapse file tree
src/modules/dw/CountryProfile Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,9 +52,9 @@ export default class Resources {
5252 private defaultArgs ;
5353
5454 public static getMaxYear ( data : Array < { year ?: number | null } > ) : number {
55- const years = data . map ( obj => Number ( obj . year ) ) ;
55+ const years = data . map ( obj => Number ( obj . year ) ) . filter ( year => year !== Infinity ) ;
5656
57- return Math . max . apply ( null , years ) ;
57+ return Math . abs ( Math . max . apply ( null , years ) ) ;
5858 }
5959 // FIXME: This may not be necessary, category order alone maybe enough
6060 public static getFlowPositions = ( flowRefs : IFlowRef [ ] ) => ( flow : IFlowRef ) : number => {
@@ -362,8 +362,6 @@ export default class Resources {
362362 }
363363 private async processResourceData ( data : IRAWFlow [ ] ) : Promise < DH . IResourceData [ ] > {
364364 try {
365- console . log ( data ) ;
366-
367365 const processed : IFlowProcessed [ ] = indicatorDataProcessingSimple < IFlowProcessed > ( data ) ;
368366 const flowRefs : IFlowRef [ ] = await getFlows ( ) ;
369367 const getPosition = Resources . getFlowPositions ( flowRefs ) ;
You can’t perform that action at this time.
0 commit comments