@barchart/portfolio-api-common 1.0.143 → 1.0.147

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.
@@ -229,16 +229,18 @@ module.exports = (() => {
229
229
 
230
230
  const initializeGroupObservers = (group, groupTree) => {
231
231
  addGroupBinding(group, group.registerGroupExcludedChangeHandler((excluded, sender) => {
232
- groupTree.climb((parentGroup, parentTree) => {
233
- let excludedItems = [ ];
234
-
235
- currentTree.walk((childGroup, childTree) => {
236
- if (childGroup.excluded) {
237
- excludedItems = excludedItems.concat(childGroup.items);
238
- }
239
- }, false, false);
240
-
241
- parentGroup.setExcludedItems(array.unique(excludedItems));
232
+ groupTree.climb((parentGroup) => {
233
+ if (parentGroup) {
234
+ let excludedItems = [];
235
+
236
+ currentTree.walk((childGroup) => {
237
+ if (childGroup.excluded) {
238
+ excludedItems = excludedItems.concat(childGroup.items);
239
+ }
240
+ }, false, false);
241
+
242
+ parentGroup.setExcludedItems(array.unique(excludedItems));
243
+ }
242
244
  }, false);
243
245
  }));
244
246
  };
@@ -293,6 +293,8 @@ module.exports = (() => {
293
293
  const key = item.position.position;
294
294
 
295
295
  map[key] = item;
296
+
297
+ return map;
296
298
  }, { });
297
299
 
298
300
  this.refresh();
@@ -314,7 +316,7 @@ module.exports = (() => {
314
316
  assert.argumentIsRequired(value, 'value', Boolean);
315
317
 
316
318
  if (this._excluded !== value) {
317
- this._groupExcludedChangeEvent(this._excluded = value);
319
+ this._groupExcludedChangeEvent.fire(this._excluded = value);
318
320
  }
319
321
  }
320
322
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.0.143",
3
+ "version": "1.0.147",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",
@@ -945,16 +945,18 @@ module.exports = (() => {
945
945
 
946
946
  const initializeGroupObservers = (group, groupTree) => {
947
947
  addGroupBinding(group, group.registerGroupExcludedChangeHandler((excluded, sender) => {
948
- groupTree.climb((parentGroup, parentTree) => {
949
- let excludedItems = [ ];
950
-
951
- currentTree.walk((childGroup, childTree) => {
952
- if (childGroup.excluded) {
953
- excludedItems = excludedItems.concat(childGroup.items);
954
- }
955
- }, false, false);
956
-
957
- parentGroup.setExcludedItems(array.unique(excludedItems));
948
+ groupTree.climb((parentGroup) => {
949
+ if (parentGroup) {
950
+ let excludedItems = [];
951
+
952
+ currentTree.walk((childGroup) => {
953
+ if (childGroup.excluded) {
954
+ excludedItems = excludedItems.concat(childGroup.items);
955
+ }
956
+ }, false, false);
957
+
958
+ parentGroup.setExcludedItems(array.unique(excludedItems));
959
+ }
958
960
  }, false);
959
961
  }));
960
962
  };
@@ -1511,6 +1513,8 @@ module.exports = (() => {
1511
1513
  const key = item.position.position;
1512
1514
 
1513
1515
  map[key] = item;
1516
+
1517
+ return map;
1514
1518
  }, { });
1515
1519
 
1516
1520
  this.refresh();
@@ -1532,7 +1536,7 @@ module.exports = (() => {
1532
1536
  assert.argumentIsRequired(value, 'value', Boolean);
1533
1537
 
1534
1538
  if (this._excluded !== value) {
1535
- this._groupExcludedChangeEvent(this._excluded = value);
1539
+ this._groupExcludedChangeEvent.fire(this._excluded = value);
1536
1540
  }
1537
1541
  }
1538
1542