@barchart/portfolio-api-common 1.0.178 → 1.0.179

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.
@@ -793,11 +793,13 @@ module.exports = (() => {
793
793
  array.remove(this._currencies[currency.code], i => i === positionItem);
794
794
  }
795
795
 
796
- this._trees[key].walk((group, groupNode) => {
797
- if (group.definition.type === PositionLevelType.POSITION && group.key === positionItem.position.position) {
798
- groupNode.sever();
799
- }
800
- }, true, false);
796
+ Object.keys(this._trees).forEach((key) => {
797
+ this._trees[key].walk((group, groupNode) => {
798
+ if (group.definition.type === PositionLevelType.POSITION && group.key === positionItem.position.position) {
799
+ groupNode.sever();
800
+ }
801
+ }, true, false);
802
+ });
801
803
 
802
804
  positionItem.dispose();
803
805
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.0.178",
3
+ "version": "1.0.179",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",
@@ -1509,11 +1509,13 @@ module.exports = (() => {
1509
1509
  array.remove(this._currencies[currency.code], i => i === positionItem);
1510
1510
  }
1511
1511
 
1512
- this._trees[key].walk((group, groupNode) => {
1513
- if (group.definition.type === PositionLevelType.POSITION && group.key === positionItem.position.position) {
1514
- groupNode.sever();
1515
- }
1516
- }, true, false);
1512
+ Object.keys(this._trees).forEach((key) => {
1513
+ this._trees[key].walk((group, groupNode) => {
1514
+ if (group.definition.type === PositionLevelType.POSITION && group.key === positionItem.position.position) {
1515
+ groupNode.sever();
1516
+ }
1517
+ }, true, false);
1518
+ });
1517
1519
 
1518
1520
  positionItem.dispose();
1519
1521
  }