Bugfix/fix cannot read properties of undefined reading items in get position (#2667)
* Fix "Cannot read properties of undefined (reading 'items')" * Update changelog
This commit is contained in:
parent
232d30234c
commit
8898d02442
@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
- Upgraded `http-status-codes` from version `2.2.0` to `2.3.0`
|
- Upgraded `http-status-codes` from version `2.2.0` to `2.3.0`
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Handled reading items from missing transaction point while getting the position (`getPosition()`) in portfolio service
|
||||||
|
|
||||||
## 2.24.0 - 2023-11-16
|
## 2.24.0 - 2023-11-16
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -879,7 +879,7 @@ export class PortfolioService {
|
|||||||
let currentAveragePrice = 0;
|
let currentAveragePrice = 0;
|
||||||
let currentQuantity = 0;
|
let currentQuantity = 0;
|
||||||
|
|
||||||
const currentSymbol = transactionPoints[j].items.find(
|
const currentSymbol = transactionPoints[j]?.items.find(
|
||||||
({ symbol }) => {
|
({ symbol }) => {
|
||||||
return symbol === aSymbol;
|
return symbol === aSymbol;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user