Skip to content

Commit 12ec0ee

Browse files
Fix bug that prevents resource groups from loading when there's a ghost resource (#820)
* Fix bug that prevents resource groups from loading when there's a ghost resource * Update changelog
1 parent 3a9e91b commit 12ec0ee

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
## Unreleased
4+
5+
### Fixed
6+
* [[820]](https://github.com/microsoft/vscode-azureresourcegroups/pull/820) Fix bug that prevents resource groups from loading when there's a ghost resource
7+
38
## 0.8.4 - 2024-02-07
49

510
### Added

src/tree/azure/grouping/AzureResourceGroupingManager.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,15 @@ function groupBy({ allResources, keySelector, initialGrouping, groupingItemFacto
4646
},
4747
initialGrouping);
4848

49-
return Object.entries(map).map(([key, resources]) => groupingItemFactory(key, resources));
49+
const groupingItems: GroupingItem[] = [];
50+
Object.entries(map).forEach(([key, resources]) => {
51+
try {
52+
groupingItems.push(groupingItemFactory(key, resources));
53+
} catch (e) {
54+
ext.outputChannel.error(`Error creating grouping item for key: "${key}"`, e);
55+
}
56+
});
57+
return groupingItems;
5058
}
5159

5260
export class AzureResourceGroupingManager extends vscode.Disposable {

0 commit comments

Comments
 (0)