Skip to content

Commit

Permalink
Change getSelectedResources to only retrieve non-extension resources …
Browse files Browse the repository at this point in the history
…for upload
  • Loading branch information
daniellrgn committed Oct 12, 2024
1 parent d66e859 commit 79c5dc6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/lib/IPSResourceCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,15 @@ export class IPSResourceCollection {
* Gets the list of resources that are selected for upload.
* @returns The list of selected resources.
*/
getSelectedResources(): ResourceHelper[] {
let selectedResources = Object.values(get(this.resourcesByType))
getSelectedIPSResources(): ResourceHelper[] {
let rBT = JSON.parse(JSON.stringify(get(this.resourcesByType)));
Object.keys(this.extensionSections).forEach((key) => {
delete rBT[key];
});
let selectedIPSResources = Object.values(rBT)
.flatMap(types => Object.values(types))
.filter(resource => (resource as ResourceHelper).include ) as ResourceHelper[];
return selectedResources;
return selectedIPSResources;
}

toJson() {
Expand Down

0 comments on commit 79c5dc6

Please sign in to comment.