Skip to content

Commit

Permalink
Fix: stop recursive deep copy (#2151)
Browse files Browse the repository at this point in the history
  • Loading branch information
thewahome authored Oct 6, 2022
1 parent 979e2a6 commit eee431c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/utils/resources/resources-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ function getResourcesSupportedByVersion(
searchText?: string
): IResource[] {
const versionedResources: IResource[] = [];
const resourcesList = JSON.parse(JSON.stringify(resources)); // deep copy
resourcesList.forEach((resource: IResource) => {
resources.forEach((resource: IResource) => {
if (versionExists(resource, version)) {
resource.children = getResourcesSupportedByVersion(
resource.children || [],
Expand Down

0 comments on commit eee431c

Please sign in to comment.