@barchart/portfolio-api-common 1.0.145 → 1.0.146

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.
@@ -230,15 +230,17 @@ module.exports = (() => {
230
230
  const initializeGroupObservers = (group, groupTree) => {
231
231
  addGroupBinding(group, group.registerGroupExcludedChangeHandler((excluded, sender) => {
232
232
  groupTree.climb((parentGroup, parentTree) => {
233
- let excludedItems = [ ];
233
+ if (parentGroup !== null) {
234
+ let excludedItems = [];
234
235
 
235
- currentTree.walk((childGroup, childTree) => {
236
- if (childGroup.excluded) {
237
- excludedItems = excludedItems.concat(childGroup.items);
238
- }
239
- }, false, false);
236
+ currentTree.walk((childGroup, childTree) => {
237
+ if (childGroup.excluded) {
238
+ excludedItems = excludedItems.concat(childGroup.items);
239
+ }
240
+ }, false, false);
240
241
 
241
- parentGroup.setExcludedItems(array.unique(excludedItems));
242
+ parentGroup.setExcludedItems(array.unique(excludedItems));
243
+ }
242
244
  }, false);
243
245
  }));
244
246
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.0.145",
3
+ "version": "1.0.146",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",
@@ -946,15 +946,17 @@ module.exports = (() => {
946
946
  const initializeGroupObservers = (group, groupTree) => {
947
947
  addGroupBinding(group, group.registerGroupExcludedChangeHandler((excluded, sender) => {
948
948
  groupTree.climb((parentGroup, parentTree) => {
949
- let excludedItems = [ ];
949
+ if (parentGroup !== null) {
950
+ let excludedItems = [];
950
951
 
951
- currentTree.walk((childGroup, childTree) => {
952
- if (childGroup.excluded) {
953
- excludedItems = excludedItems.concat(childGroup.items);
954
- }
955
- }, false, false);
952
+ currentTree.walk((childGroup, childTree) => {
953
+ if (childGroup.excluded) {
954
+ excludedItems = excludedItems.concat(childGroup.items);
955
+ }
956
+ }, false, false);
956
957
 
957
- parentGroup.setExcludedItems(array.unique(excludedItems));
958
+ parentGroup.setExcludedItems(array.unique(excludedItems));
959
+ }
958
960
  }, false);
959
961
  }));
960
962
  };