@barchart/portfolio-api-common 1.0.168 → 1.0.169

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -243,9 +243,7 @@ module.exports = (() => {
243
243
  assert.argumentIsRequired(portfolio.portfolio, 'portfolio.portfolio', String);
244
244
 
245
245
  this.startTransaction(() => {
246
- const itemsToRemove = getPositionItemsForPortfolio(this._items, portfolio.portfolio).forEach(i => removePositionItem.call(this, i));
247
-
248
- itemsToRemove.forEach(item => removePositionItem.call(this, item));
246
+ getPositionItemsForPortfolio(this._items, portfolio.portfolio).forEach(item => removePositionItem.call(this, item));
249
247
 
250
248
  delete this._portfolios[portfolio.portfolio];
251
249
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.0.168",
3
+ "version": "1.0.169",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",
@@ -959,9 +959,7 @@ module.exports = (() => {
959
959
  assert.argumentIsRequired(portfolio.portfolio, 'portfolio.portfolio', String);
960
960
 
961
961
  this.startTransaction(() => {
962
- const itemsToRemove = getPositionItemsForPortfolio(this._items, portfolio.portfolio).forEach(i => removePositionItem.call(this, i));
963
-
964
- itemsToRemove.forEach(item => removePositionItem.call(this, item));
962
+ getPositionItemsForPortfolio(this._items, portfolio.portfolio).forEach(item => removePositionItem.call(this, item));
965
963
 
966
964
  delete this._portfolios[portfolio.portfolio];
967
965