Bugfix/fix cannot read properties of undefined reading items in get position (#2667)

* Fix "Cannot read properties of undefined (reading 'items')"

* Update changelog
pull/2672/head
Thomas Kaul 7 months ago committed by GitHub
parent 232d30234c
commit 8898d02442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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`
### Fixed
- Handled reading items from missing transaction point while getting the position (`getPosition()`) in portfolio service
## 2.24.0 - 2023-11-16
### Changed

@ -879,7 +879,7 @@ export class PortfolioService {
let currentAveragePrice = 0;
let currentQuantity = 0;
const currentSymbol = transactionPoints[j].items.find(
const currentSymbol = transactionPoints[j]?.items.find(
({ symbol }) => {
return symbol === aSymbol;
}

Loading…
Cancel
Save