Remove undefined props
This commit is contained in:
		
							parent
							
								
									f6fd703005
								
							
						
					
					
						commit
						84f79ffe7c
					
				|  | @ -11,6 +11,7 @@ import { PortfolioMetrics, User } from './user' | ||||||
| import { DAY_MS } from './util/time' | import { DAY_MS } from './util/time' | ||||||
| import { getBinaryCpmmBetInfo, getNewMultiBetInfo } from './new-bet' | import { getBinaryCpmmBetInfo, getNewMultiBetInfo } from './new-bet' | ||||||
| import { getCpmmProbability } from './calculate-cpmm' | import { getCpmmProbability } from './calculate-cpmm' | ||||||
|  | import { removeUndefinedProps } from './util/object' | ||||||
| 
 | 
 | ||||||
| const computeInvestmentValue = ( | const computeInvestmentValue = ( | ||||||
|   bets: Bet[], |   bets: Bet[], | ||||||
|  | @ -275,11 +276,11 @@ export const calculateMetricsByContract = ( | ||||||
|       ) |       ) | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return { |     return removeUndefinedProps({ | ||||||
|       contractId: c.id, |       contractId: c.id, | ||||||
|       ...current, |       ...current, | ||||||
|       from: periodMetrics, |       from: periodMetrics, | ||||||
|     } |     }) | ||||||
|   }) |   }) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user